
/* =============================================================================
   LAYOUT PRINCIPAL
   ============================================================================= */
   html, body {
    overflow: hidden;
}/*ça permet d'enlever la barre de scoll*/


.app-container {
    display: flex;
    width: 100%;
    height: 100vh;
    position: relative;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* =============================================================================
   HEADER ET TITRES
   ============================================================================= */

.header {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
}

.header h1 {
    font-size: clamp(24px, 4vw, 48px);
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 8px;
    color: #01B5D0;
}

.header-word {
    text-align: center;
    margin-bottom: 20px;
}

.header-word h1 {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 8px;
    color: #1C1B1F;
}

.header-word p {
    font-size: 14px;
    opacity: 0.7;
    color: #01B5D0;
}

/* =============================================================================
   CONTENEURS SPHÈRE ET VIDÉO
   ============================================================================= */

.sphere-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sphere-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

#sphere-container {
    width: 600px;
    height: 600px;
    position: relative;
    margin: 0 auto;
}

.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

#video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.3) blur(1px);
}

#link-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* =============================================================================
   PANNEAUX LATÉRAUX
   ============================================================================= */

.side-panel {
    width: 320px;
    height: 100vh;
    background: #ffffff;
    border: #EE7800 3px solid;
    position: fixed;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    color: #1C1B1F;
}

.left-panel {
    left: 0;
    transform: translateX(-100%);
}

.right-panel {
    right: 0;
    transform: translateX(100%);
}

.side-panel.active {
    transform: translateX(0);
}

.panel-header {
    padding: 20px;
    background: #EE7800;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 400;
    color: #ffffff;
}

.panel-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.panel-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.panel-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* =============================================================================
   CONTRÔLES ET BOUTONS
   ============================================================================= */

.controls {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

button {
    padding: 10px 16px;
    background: #01B5D0;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: #0195b5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 181, 208, 0.3);
}

.primary-btn {
    background: #ff9800;
}

.primary-btn:hover {
    background: #ff9800;
    box-shadow: 0 6px 20px rgba(238, 120, 0, 0.4);
}

.toggle-panel-btn {
    background: #1C1B1F;
}

.toggle-panel-btn:hover {
    background: #2c2a2f;
    box-shadow: 0 6px 20px rgba(28, 27, 31, 0.4);
}

/* =============================================================================
   FORMULAIRES ET CHAMPS
   ============================================================================= */

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

input, textarea, select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.3);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

#char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.8);
}

.hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 6px;
    font-style: italic;
}

#new-word {       
    border: 2px solid #ff9800; 
}

#new-word::placeholder {
    color: #ff9800; 
    opacity: 1;     
}

#word-description {
    border: 2px solid #ff9800; 
}
#word-description::placeholder {
    color: #ff9800; 
    opacity: 1;
}

#word-links-select {
    border: 2px solid #ff9800; 
}

.hint {
    color: #090909; 
    opacity: 1;
}

/* =============================================================================
   NUAGE DE TAGS
   ============================================================================= */

.tagcloud {
    display: inline-block;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tagcloud--item {
    color: #1C1B1F;
    display: inline-block;
    padding: 4px 12px;
    position: absolute;
    top: 0;
    left: 0;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    white-space: nowrap;
    transform-origin: center center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
}

.tagcloud--item:hover {
    transform: scale(1.1);
    text-shadow: 0 0 10px rgba(238, 120, 0, 0.5);
    z-index: 1000 !important;
}

/* =============================================================================
   DÉTAILS DU MOT
   ============================================================================= */

#word-details {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#detail-word-title {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 16px;
}

#detail-word-description {
    margin-bottom: 24px;
    line-height: 1.6;
}

.related-words-section {
    margin-top: 28px;
}

.related-words-section h4 {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 500;
}

#related-words-list {
    list-style: none;
}

#related-words-list li {
    margin-bottom: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #EE7800
}

#related-words-list li:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 1024px) {
    .side-panel {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 28px;
    }

    #sphere-container {
        width: 100%;
        height: 400px;
    }

    .side-panel {
        width: 280px;
    }

    .controls {
        gap: 8px;
    }

    button {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px;
    }

    .header {
        top: 15px;
    }

    .panel-content {
        padding: 15px;
    }

    .side-panel {
        width: 100%;
    }
}

/* =============================================================================
   ANIMATIONS ET TRANSITIONS
   ============================================================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content {
    animation: fadeIn 0.6s ease-out;
}

/* Amélioration des performances */
.side-panel,
.tagcloud--item,
button {
    will-change: transform;
}

/* Scrollbar personnalisée */
.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* =============================================================================
   Popup information
   ============================================================================= */


 /* CSS pour le bouton d'aide et la popup */
.help-button-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ff9800;
    color: white;
    border: none;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
    vertical-align: middle;
}

.help-button-inline:hover {
    background: #ff9800;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(238, 120, 0, 0.4);
}

.help-button-inline:active {
    transform: scale(0.95);
}

.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.help-popup {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.help-popup h3 {
    color: #1C1B1F;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 400;
    border-bottom: 2px solid #ff9800;
    padding-bottom: 10px;
}

.help-popup h4 {
    color: #EE7800;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 500;
}

.help-popup p {
    color: #1C1B1F;
    line-height: 1.6;
    margin-bottom: 15px;
}

.help-popup ul {
    color: #1C1B1F;
    margin-bottom: 15px;
    padding-left: 20px;
}

.help-popup li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.help-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.help-close:hover {
    background: #f0f0f0;
    color: #333;
}

.help-feature {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #EE7800;
}

/* Responsive design */
@media (max-width: 768px) {
    .help-popup {
        padding: 20px;
        margin: 10px;
    }
    
    .help-button-inline {
        width: 20px;
        height: 20px;
        font-size: 12px;
        margin-left: 8px;
    }
    
    .help-popup h3 {
        font-size: 20px;
    }
}