:root {
    --gear-size: 600px;
    --tooth-size: 100px; 
    --gear-color: #333;
    --background-color: #1a1a1a;
    --text-color: #f0f0f0;
}
/* A normal, unvisited link */
a:link {
  color: #f39c12;
  text-decoration: none;
}

/* A link the user has already visited */
a:visited {
  color: #c0392b;
}

/* A link when the user mouses over it */
a:hover {
  color: #f1c40f;
  text-decoration: underline;
}

/* A link the moment it is clicked */
a:active {
  color: #e67e22;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
}

header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.menu-wrapper {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 101;
}

.menu-icon {
    font-size: 20px;
    font-weight: bold;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    background: var(--panel-background);
    backdrop-filter: blur(5px);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #444;
    width: 250px;
}

.menu a, .menu p {
    display: block;
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 16px;
}
.menu a:hover {
    color: #f39c12;
}

main {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
}

#media-viewer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#media-viewer img,
#media-viewer video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#article-panel {
    position: absolute;
    top: 0;
    right: 0; 
    width: 40%;
    max-width: 450px;
    height: 100%;
    background-color: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(8px);
    z-index: 50;
    overflow-y: auto;
    padding: 30px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    border-left: 1px solid #444;
    box-sizing: border-box;
}

#article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc((var(--gear-size) / 2) + (var(--tooth-size) / 2) + 20px);
    z-index: 10;
    overflow: hidden;
    pointer-events: none;
    perspective: 1000px;
}

#logo {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    z-index: 12; 
    pointer-events: auto;
}

#gear-container {
    position: absolute;
    bottom: calc(var(--gear-size) / -2);
    left: 50%;
    transform: translateX(-50%);
    width: var(--gear-size);
    height: var(--gear-size);
    pointer-events: auto;
    transform-style: preserve-3d;
}

#gear-container::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #282828;
    border-radius: 50%;
    border: 5px solid #222;
    z-index: 11;
}

.gear {
    width: 100%;
    height: 100%;
    position: relative;
    animation: spin 30s linear infinite;
    pointer-events: none; 
    transform-style: preserve-3d;
}

/* FIX: Added metallic gradient, shine animation, and overflow hidden */
.gear::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(5px); /* Raised slightly to be on top */
    width: 65%;
    height: 65%;
    background: radial-gradient(circle at 30% 30%, #555, #333 80%);
    border-radius: 50%;
    border: 5px solid #222;
    box-shadow: inset 0 0 20px #000;
    overflow: hidden; /* Important for the shine effect */
}

/* FIX: New pseudo-element for the animated shine */
.gear::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(6px); /* Position just above the gear surface */
    width: 65%;
    height: 65%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 50%);
    animation: shine 5s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* FIX: New animation for the metallic shine */
@keyframes shine {
    0% { transform: translate(-50%, -50%) translateZ(6px) rotate(0deg); }
    100% { transform: translate(-50%, -50%) translateZ(6px) rotate(360deg); }
}

.tooth {
    position: absolute;
    left: 50%;
    top: 0;
    margin-left: calc(var(--tooth-size) / -2);
    width: var(--tooth-size);
    height: calc(var(--gear-size) / 2);
    transform-origin: center bottom;
    pointer-events: auto;
    /* FIX: Placed at Z=0, between the gear body (Z=5) and background */
    transform: translateZ(0); 
}

.tooth-button {
    width: var(--tooth-size);
    height: var(--tooth-size);
    background-color: #555;
    background-size: cover;
    background-position: center;
    /* FIX: Border color now matches gear border */
    border: 5px solid #222;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
    /* FIX: Added an inner shadow for depth */
    box-shadow: 0 5px 15px rgba(0,0,0,0.4), inset 0 -10px 15px rgba(0,0,0,0.3);
    position: absolute;
    top: 80px; 
    transform: translateY(-50%); 
}

.tooth-button:hover {
    transform: translateY(-50%) scale(1.15);
    border-color: #f39c12;
    z-index: 100;
}


/* ========================================= */
/* ===           MOBILE STYLES           === */
/* ========================================= */
@media (max-width: 768px) {
    :root {
        --gear-size: 400px;
        --tooth-size: 70px;
    }

    body {
        overflow-y: auto;
        overflow-x: hidden;
    }
	
    #social-links {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #0a0a0a;
        padding: 8px;
        margin: 0;
        box-sizing: border-box;
        text-align: center;
        z-index: 1000;
        border-top: 1px solid #333;
    }
	
    footer {
        position: absolute;
        top: 0;
        bottom: auto;
        height: calc(var(--gear-size) / 2);
        overflow-y: visible;
        overflow-x: hidden;
        z-index: 20;
        pointer-events: auto;
    }

    #gear-container {
        position: absolute;
        top: calc(var(--gear-size) / -2);
        bottom: auto;
        pointer-events: auto;
    }
    
    main {
        position: relative;
        padding-top: calc(var(--gear-size) / 2);
        overflow: auto;
        z-index: 5;
		padding-bottom: 50px;
    }
    
    #media-viewer {
        z-index: -1;
    }

    .menu-wrapper {
        left: 15px;
        right: auto;
    }
    .menu {
        left: 0;
        right: auto;
    }
    
    #logo {
        top: 20px;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
        width: 120px;
        height: 120px;
    }

    #gear-container::before {
        width: 140px;
        height: 140px;
    }
    
    .tooth-button {
        top: 60px;
    }

    #article-panel {
        width: 100%;
        max-width: 100%;
        height: auto;
        position: static;
        box-shadow: none;
        border-left: none;
        background-color: rgba(26, 26, 26, 0.7);
    }
}
/* --- STYLE DU BOUTON DE COMMANDE (CORRIGÉ) --- */
/* On rend la règle plus spécifique en précisant que c'est un lien <a> */
a.order-button, 
a.order-button:link, 
a.order-button:visited {
    display: inline-block;
    background-color: #f39c12;
    color: #1a1a1a !important; /* On force la couleur du texte à être sombre */
    padding: 12px 25px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
}

a.order-button:hover {
    background-color: #f1c40f;
    color: #000000 !important; /* On s'assure que le texte reste noir au survol */
    text-decoration: none;
}

/* --- STYLES POUR LA PAGE DE COMMANDE --- */
body.order-page {
    background-color: #111;
    display: block;
    overflow-y: auto;
}

.order-header {
    text-align: center;
    padding: 20px;
}
.order-header #logo {
    position: static;
    transform: none;
    width: 120px;
    height: 120px;
    margin-bottom: 15px;
}
.order-header h1 {
    color: #f0f0f0;
}

.order-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background: #1e1e1e;
    border-radius: 8px;
    border: 1px solid #333;
}

.order-container h2 {
    color: #f39c12;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
}

/* --- CARROUSEL --- */
.artwork-selector {
    text-align: center;
}
.carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}
/* /style6.css -> Trouvez et remplacez cette règle */
.carousel-track-container {
    width: 250px; /* On augmente un peu la largeur */
    height: auto; /* La hauteur s'adaptera au contenu ! */
    max-height: 250px; /* On limite la hauteur pour les images très verticales */
    overflow: hidden;
    border-radius: 8px;
    display: flex;       /* Permet de bien centrer l'image à l'intérieur */
    align-items: center;
    justify-content: center;
}


.carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
}
.carousel-item {
    flex: 0 0 100%;
    padding: 5px;
    box-sizing: border-box;
}
.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    border: 3px solid transparent;
    transition: border-color 0.3s;
}
.carousel-item.active img {
    border-color: #f39c12;
}
.arrow {
    background: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 24px;
    cursor: pointer;
    margin: 0 15px;
    border-radius: 50%;
}

.selected-artwork-title {
    font-size: 1.2em;
    margin-top: 10px;
}
.selected-artwork-title strong {
    color: #f0f0f0;
}
.selected-artwork-title span {
    color: #f1c40f;
}

/* --- FORMULAIRE --- */
/* ================================================= */
/* === NOUVEAUX STYLES POUR LA PAGE DE COMMANDE === */
/* ================================================= */
body.order-page {
    background-color: #1a1a1a;
    background-image: radial-gradient(circle at 20% 20%, rgba(50, 50, 50, 0.3), transparent 50%),
                      radial-gradient(circle at 80% 70%, rgba(40, 40, 40, 0.2), transparent 40%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: block;
    overflow-y: auto;
}

.order-header {
    text-align: center;
    padding: 20px 20px 0 20px;
}
.order-header #logo {
    position: static;
    transform: none;
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
}
.order-header h1 {
    color: #f0f0f0;
    font-weight: 300;
    letter-spacing: 1px;
    font-size: 2.5em;
}

.order-container {
    max-width: 900px;
    margin: 50px auto 30px auto; /* On ajoute 50px de marge en haut */
    padding: 0;
    background: transparent;
    border: none;
}

/* --- Sections du formulaire --- */
.form-section {
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 30px;
    padding: 25px 35px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #444;
    padding-bottom: 15px;
}
.section-header .section-number {
    font-size: 24px;
    font-weight: bold;
    color: #1a1a1a;
    background-color: #f39c12;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}
.section-header h2 {
    margin: 0;
    color: #f0f0f0;
    font-weight: 500;
}

/* --- Carrousel amélioré --- */
.artwork-selector { text-align: center; }
.carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}
.carousel-track-container {
    width: 200px;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
}
.carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
}
.carousel-item {
    flex: 0 0 100%;
    padding: 0;
    cursor: pointer;
}
.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 4px solid #444;
    border-radius: 8px;
    transition: all 0.3s ease;
    filter: saturate(0.8);
}
.carousel-item.active img {
    border-color: #f39c12;
    transform: scale(1.05);
    filter: saturate(1);
}
.arrow {
    background: #333;
    color: white;
    border: 1px solid #555;
    padding: 8px 15px;
    font-size: 22px;
    cursor: pointer;
    margin: 0 20px;
    border-radius: 50%;
    transition: background-color 0.2s, transform 0.2s;
}
.arrow:hover {
    background-color: #f39c12;
    color: #1a1a1a;
    transform: scale(1.1);
}
.selected-artwork-title { font-size: 1.2em; margin-top: 15px; color: #ccc; }
.selected-artwork-title strong { color: #f0f0f0; }
.selected-artwork-title span { color: #f39c12; font-weight: bold; }

/* --- Grille et champs du formulaire --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-group.full-width {
    grid-column: 1 / -1;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #ccc;
    font-size: 0.9em;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group select {
    width: 100%;
    padding: 12px;
    background: #1e1e1e;
    border: 1px solid #444;
    border-radius: 4px;
    color: #f0f0f0;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input::placeholder {
    color: #666;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.2);
}
.support-info {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
    color: #ccc;
    border-left: 3px solid #f39c12;
    min-height: 20px;
}

/* --- Checkbox et Bouton de soumission --- */
.form-group-checkbox {
    display: flex;
    align-items: center;
    margin: 25px 0;
}
.form-group-checkbox input {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}
.form-group-checkbox label {
    color: #ccc;
    font-weight: normal;
}
button[type="submit"] {
    width: 100%;
    padding: 16px;
    background-image: linear-gradient(135deg, #f39c12, #e67e22);
    color: #1a1a1a;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}
button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}
button[type="submit"]:disabled {
    background-image: none;
    background-color: #555;
    color: #888;
    cursor: not-allowed;
    opacity: 0.7;
}
#form-status {
    text-align: center;
    margin-top: 20px;
    font-weight: bold;
    min-height: 20px;
}
.lightbox {
    display: none; /* Cachée par défaut */
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}
/* --- Adaptation mobile --- */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-section {
        padding: 20px;
    }
    .order-header h1 {
        font-size: 2em;
    }
}
/* Bouton pour étendre/réduire la colonne de droite */
.panel-toggle {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 120;
    background: rgba(0, 0, 0, 0.7);
    color: #f0f0f0;
    font-weight: bold;
    font-size: 22px;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
}

/* Quand le panel est étendu en pleine largeur */
body.panel-expanded #article-panel {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    box-shadow: none;
    border-left: none;
}

/* Optionnel : on masque le média derrière quand le panel est plein écran */
body.panel-expanded #media-viewer {
    display: none;
}

/* =============================== */
/* MENU VERTICAL GAUCHE – GLOBAL   */
/* =============================== */

#side-vertical-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 22vw;
    min-width: 180px;
    max-width: 260px;
    height: 100%;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* le conteneur lui‑même ne prend pas les clics */
}

.side-menu-wheel {
    position: relative;
    width: 100%;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    pointer-events: auto; /* mais les éléments à l'intérieur oui */
}

.side-menu-item {
    font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(240, 240, 240, 0.25);
    margin: 4px 0;
    padding: 4px 16px 4px 20px;
    cursor: pointer;
    transform-origin: left center;
    transition:
        transform 0.35s ease,
        color 0.35s ease,
        opacity 0.35s ease;
    opacity: 0.2;
    white-space: normal;
    max-width: 90%;
}

/* Effet hover desktop : grossit et se décale à droite */
@media (min-width: 769px) {
    .side-menu-item:hover {
        transform: translateX(10px) scale(1.08);
        color: #ffffff;
        opacity: 1;
    }
}

/* On met un élément "actif" en valeur (central sur mobile, hover/click sur desktop) */
.side-menu-item.is-center {
    font-size: 1rem;
    opacity: 1;
    color: #f7f7f7;
}

/* =============================== */
/* COMPORTEMENT MOBILE – ROUE      */
/* =============================== */
@media (max-width: 768px) {
    #side-vertical-menu {
        width: 100%;
        height: auto;
        top: 90px; /* ajustable suivant ton layout */
        left: 0;
        justify-content: center;
        pointer-events: auto;
    }

    .side-menu-wheel {
        align-items: center;
        max-height: 40vh;
    }

    .side-menu-item {
        text-align: center;
        max-width: 90%;
    }
}
