/* ============================================
   CSS CUSTOM PROPERTIES (THEME SYSTEM)
   ============================================ */
:root {
    /* Light mode (default) */
    --bg-primary: #F5F5F7;
    --text-primary: #1D1D1F;
    --text-secondary: rgba(29, 29, 31, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-bg-strong: rgba(255, 255, 255, 0.7);
    --glass-bg-hover: rgba(255, 255, 255, 0.8);
    --glass-shadow: rgba(0, 0, 0, 0.05);
    --glass-shadow-hover: rgba(0, 0, 0, 0.08);
    --gallery-bg: rgba(255, 255, 255, 0.95);
    --overlay-bg: rgba(255, 255, 255, 0.9);
    --image-shadow: rgba(0, 0, 0, 0.12);
    --image-border: rgba(0, 0, 0, 0.05);
    --about-img-bg: #F5F5F7;
    --about-img-shadow: rgba(0, 0, 0, 0.15);
    --about-img-shadow-hover: rgba(0, 0, 0, 0.2);
    --grain-opacity: 0.15;
    --blurred-brightness: 0.95;
    --placeholder-color: #E6E6EA;
}

[data-theme="dark"] {
    --bg-primary: #0D0D0F;
    --text-primary: #F0F0F2;
    --text-secondary: rgba(240, 240, 242, 0.75);
    --glass-bg: rgba(35, 35, 40, 0.6);
    --glass-bg-strong: rgba(35, 35, 40, 0.7);
    --glass-bg-hover: rgba(55, 55, 60, 0.8);
    --glass-shadow: rgba(0, 0, 0, 0.25);
    --glass-shadow-hover: rgba(0, 0, 0, 0.35);
    --gallery-bg: rgba(13, 13, 15, 0.95);
    --overlay-bg: rgba(13, 13, 15, 0.92);
    --image-shadow: rgba(0, 0, 0, 0.5);
    --image-border: rgba(255, 255, 255, 0.1);
    --about-img-bg: #1A1A1E;
    --about-img-shadow: rgba(0, 0, 0, 0.4);
    --about-img-shadow-hover: rgba(0, 0, 0, 0.5);
    --grain-opacity: 0.06;
    --blurred-brightness: 0.6;
    --placeholder-color: #2A2A2E;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Protection générale contre la sélection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Réactiver la sélection pour le texte dans les paragraphes */
.about-text,
.about-text p,
.contact-card,
.contact-card h2,
.about-card p {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Rendre le titre sélectionnable */
#main-title {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    pointer-events: auto;
    /* Permet les interactions avec le titre */
}

/* ============================================
   BACKGROUND & ATMOSPHERE
   ============================================ */
body {
    background: var(--bg-primary);
    position: relative;
    color: var(--text-primary);
    transition: background 0.4s ease, color 0.4s ease;
}

/* Texture de grain subtile */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZmlsdGVyIGlkPSJhIiB4PSIwJSIgeT0iMCUiPjxmZVR1cmJ1bGVuY2UgYmFzZUZyZXF1ZW5jeT0iLjkiIG51bU9jdGF2ZXM9IjQiIHJlc3VsdD0ibm9pc2UiLz48ZmVDb2xvck1hdHJpeCB0eXBlPSJzYXR1cmF0ZSIgdmFsdWVzPSIwIi8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI2EpIiBvcGFjaXR5PSIwLjAzIi8+PC9zdmc+');
    pointer-events: none;
    z-index: 1;
    opacity: var(--grain-opacity);
    transition: opacity 0.4s ease;
}

/* ============================================
   LIQUID GLASS DESIGN SYSTEM
   ============================================ */
.liquid-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: none;
    border-radius: 30px;
    box-shadow: 0 4px 20px var(--glass-shadow);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.liquid-glass-strong {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: none;
    border-radius: 40px;
    box-shadow: 0 4px 20px var(--glass-shadow);
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

/* ============================================
   CANVAS CONTAINER
   ============================================ */
#canvas-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: grab;
    transition: filter 0.6s ease, opacity 0.6s ease;
    z-index: 2;
}

#canvas-container:active {
    cursor: grabbing;
}

#canvas-container.blurred {
    filter: blur(20px) brightness(var(--blurred-brightness));
    opacity: 0.3;
}

/* ============================================
   UI BUTTONS
   ============================================ */
.ui-button {
    /* Position control via #ui-controls container */
    position: relative;
    z-index: 1000;
    padding: 12px 24px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    /* Style Liquid Glass */
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-radius: 100px;
    box-shadow:
        0 4px 20px var(--glass-shadow),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.ui-button:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 10px 30px var(--glass-shadow-hover),
        inset 0 1px 1px rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

.ui-button:active {
    transform: translateY(0) scale(0.98);
}

@keyframes slideDownFade {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   UI CONTROLS (FLEX CONTAINER)
   ============================================ */
#ui-controls {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: row;
    /* Theme toggle first on left, then Contact, then About on right */
    gap: 16px;
    align-items: center;
    pointer-events: none;
    /* Let clicks pass through container */
}

#ui-controls .ui-button {
    position: relative;
    /* Reset from fixed */
    top: auto;
    right: auto;
    left: auto;
    bottom: auto;
    pointer-events: auto;
    /* Re-enable clicks on buttons */
    margin: 0;
}

#about-button {
    animation: slideDownFade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
    animation-delay: 2.4s;
}

#contact-button {
    animation: slideDownFade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
    animation-delay: 2.3s;
}

#theme-toggle {
    animation: slideDownFade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
    animation-delay: 2.2s;
}

/* ============================================
   THEME TOGGLE
   ============================================ */
#theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    /* Carré/Rond pour l'icône */
    min-width: 44px;
    min-height: 44px;
    font-size: 16px;
    line-height: 1;
}

#theme-toggle .theme-icon {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#theme-toggle:hover .theme-icon {
    transform: rotate(30deg);
}

/* ============================================
   MAIN TITLE
   ============================================ */
#main-title {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    color: var(--text-primary);
    font-family: 'Inter', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    font-size: 32px;
    letter-spacing: 6px;
    text-transform: uppercase;
    transition: opacity 0.3s ease, color 0.4s ease;
    pointer-events: auto;
    /* Permet la sélection du texte */
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

#main-title.hidden {
    opacity: 0;
}

/* ============================================
   GALLERY VIEW (EDITORIAL STYLE)
   ============================================ */
#gallery-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: var(--gallery-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.4s ease;
}

#gallery-view.active {
    display: flex;
}

.gallery-frame {
    max-width: 80vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gallery-image {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--image-border);
    box-shadow: 0 20px 60px var(--image-shadow);
    object-fit: contain;
    /* Protection contre le téléchargement */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

.gallery-location {
    margin-top: 20px;
    font-size: 10px;
    font-weight: 300;
    color: var(--text-primary);
    opacity: 0.5;
    letter-spacing: 0.5px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    text-transform: none;
    text-align: center;
    transition: color 0.4s ease;
}

/* Navigation positionnée aux bords de l'écran */
.gallery-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    padding: 10px 15px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 300;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease, color 0.4s ease;
    border: none;
    background: transparent;
    z-index: 2001;
}

.gallery-nav:hover {
    opacity: 0.5;
}

.gallery-nav.prev {
    left: 40px;
}

.gallery-nav.next {
    right: 40px;
}

.gallery-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: auto;
    height: auto;
    padding: 5px 10px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 300;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease, color 0.4s ease;
    border: none;
    background: transparent;
    z-index: 2001;
}

.gallery-close:hover {
    opacity: 0.5;
}

/* ============================================
   ABOUT OVERLAY
   ============================================ */
#about-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--overlay-bg);
    gap: 60px;
    transition: background 0.4s ease;
}

#about-overlay.active {
    display: flex;
}

.about-image-wrapper {
    flex-shrink: 0;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 12px 40px var(--about-img-shadow);
    background: var(--about-img-bg);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.4s ease;
}

.about-image-wrapper:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 50px var(--about-img-shadow-hover);
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
}

.about-card {
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
}

.about-card h2 {
    color: var(--text-primary);
    font-size: 32px;
    margin-bottom: 30px;
    font-weight: 300;
    letter-spacing: 2px;
    text-align: left;
    transition: color 0.4s ease;
}

.about-text {
    width: 100%;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 16px;
    transition: color 0.4s ease;
}

.about-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: auto;
    height: auto;
    padding: 8px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 300;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease, color 0.4s ease;
    border: none;
    /* Style Liquid Glass */
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 20px var(--glass-shadow);
}

.about-close:hover {
    background: var(--glass-bg-hover);
    transform: scale(1.05);
}

/* ============================================
   CONTACT OVERLAY
   ============================================ */
#contact-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--overlay-bg);
    transition: background 0.4s ease;
}

#contact-overlay.active {
    display: flex;
}

.contact-card {
    max-width: 500px;
    width: 100%;
    padding: 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-card h2 {
    color: var(--text-primary);
    font-size: 32px;
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 2px;
    transition: color 0.4s ease;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.contact-link {
    padding: 16px 24px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease, color 0.4s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    /* Style Liquid Glass */
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: none;
    border-radius: 30px;
    box-shadow: 0 4px 20px var(--glass-shadow);
}

.contact-link:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--glass-shadow-hover);
}

.contact-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: auto;
    height: auto;
    padding: 8px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 300;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease, color 0.4s ease;
    border: none;
    /* Style Liquid Glass */
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 20px var(--glass-shadow);
}

.contact-close:hover {
    background: var(--glass-bg-hover);
    transform: scale(1.05);
}

/* ============================================
   LOADING STATE (SPLASH SCREEN e/ʎ)
   ============================================ */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: opacity 0.8s cubic-bezier(0.7, 0, 0.3, 1), visibility 0.8s;
}

.splash-text-container {
    display: flex;
    align-items: center;
    gap: 2px;
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
}

.splash-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    filter: blur(10px);
    animation: revealChar 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.splash-char:nth-child(1) {
    animation-delay: 0.2s;
}

.splash-char:nth-child(3) {
    animation-delay: 0.6s;
}

.splash-divider {
    opacity: 0;
    transform: scale(0);
    animation: revealDivider 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.4s;
    margin: 0 4px;
    font-weight: 200;
    color: var(--text-secondary);
}

@keyframes revealChar {
    0% {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes revealDivider {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-20deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

#loading.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#loading.hidden .splash-char,
#loading.hidden .splash-divider {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.6s ease;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {

    #main-title {
        font-size: 20px !important;
        letter-spacing: 4px !important;
        top: 20px !important;
        /* Tout en haut */
        left: 50% !important;
        transform: translateX(-50%) !important;
        text-align: center !important;
        width: 100% !important;
        padding: 0 20px !important;
        z-index: 100 !important;
    }

    /* Repositionner les contrôles en haut SOUS le titre sur mobile */
    #ui-controls {
        top: 70px !important;
        /* Sous le titre */
        bottom: auto !important;
        right: 0 !important;
        left: 0 !important;
        justify-content: center !important;
        width: 100% !important;
        gap: 12px !important;
        padding: 0 15px !important;
        flex-direction: row !important;
        z-index: 101 !important;
    }

    .ui-button {
        padding: 10px 16px !important;
        font-size: 10px !important;
        letter-spacing: 1.5px !important;
        backdrop-filter: blur(15px) saturate(150%) !important;
        -webkit-backdrop-filter: blur(15px) saturate(150%) !important;
    }

    #theme-toggle {
        padding: 10px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        font-size: 14px !important;
    }

    .contact-card {
        padding: 30px 20px !important;
    }

    .contact-card h2 {
        font-size: 24px !important;
        margin-bottom: 30px !important;
    }

    .gallery-frame {
        max-width: 90vw;
    }

    /* Flèches de navigation repositionnées pour mobile */
    .gallery-nav {
        padding: 8px 12px;
        font-size: 28px;
        /* Positionner en bas de l'écran sur mobile */
        top: auto;
        bottom: 30px;
        transform: translateY(0);
    }

    .gallery-nav.prev {
        left: 50%;
        transform: translateX(-120%);
        bottom: 30px;
    }

    .gallery-nav.next {
        right: 50%;
        transform: translateX(120%);
        bottom: 30px;
    }

    .gallery-close {
        top: 15px;
        right: 15px;
    }

    /* Optimisation de l'overlay About sur mobile */
    #about-overlay {
        flex-direction: column;
        gap: 30px;
        padding: 15px;
        align-items: center;
        /* Réduire les effets de flou sur mobile pour améliorer les performances */
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }

    .about-image-wrapper {
        width: 180px;
        /* Réduit pour laisser plus d'espace */
        height: 180px;
        order: 1;
        flex-shrink: 0;
        box-shadow: 0 8px 24px var(--about-img-shadow);
    }

    .about-image-wrapper:hover {
        transform: none;
        /* Désactiver le hover sur mobile */
    }

    .about-card {
        padding: 25px 20px;
        max-height: none;
        max-width: 100%;
        width: 100%;
        order: 2;
        /* Réduire les effets glass sur mobile */
        backdrop-filter: blur(15px) saturate(150%);
        -webkit-backdrop-filter: blur(15px) saturate(150%);
    }

    .about-card h2 {
        font-size: 22px;
        margin-bottom: 20px;
        text-align: center;
        letter-spacing: 1.5px;
    }

    .about-text {
        width: 100%;
    }

    .about-text p {
        font-size: 14px;
        /* Un peu plus petit */
        line-height: 1.9;
        /* Plus d'air entre les lignes */
        font-weight: 300;
        /* Plus fin pour l'élégance */
        letter-spacing: 0.3px;
        /* Subtilement espacé */
        margin-bottom: 20px;
        text-align: left;
    }

    .about-close {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 20px;
        /* Réduire les effets glass */
        backdrop-filter: blur(15px) saturate(150%);
        -webkit-backdrop-filter: blur(15px) saturate(150%);
    }
}

@media (max-width: 480px) {

    /* Optimisation pour très petits écrans */
    .gallery-nav {
        padding: 6px 10px;
        font-size: 24px;
        bottom: 20px;
    }

    .gallery-nav.prev {
        left: 50%;
        transform: translateX(-120%);
        bottom: 20px;
    }

    .gallery-nav.next {
        right: 50%;
        transform: translateX(120%);
        bottom: 20px;
    }

    #about-overlay {
        gap: 25px;
        padding: 12px;
        align-items: center;
    }

    .about-image-wrapper {
        width: 150px;
        height: 150px;
        box-shadow: 0 6px 20px var(--about-img-shadow);
    }

    .about-card {
        padding: 22px 18px;
        max-height: none;
        width: 100%;
    }

    .about-card h2 {
        font-size: 20px;
        margin-bottom: 18px;
        letter-spacing: 1px;
    }

    .about-text p {
        font-size: 13px;
        /* Encore plus fin sur très petit écran */
        line-height: 1.85;
        font-weight: 300;
        letter-spacing: 0.2px;
        margin-bottom: 16px;
        text-align: left;
    }

    .about-close {
        top: 8px;
        right: 8px;
        padding: 5px 10px;
        font-size: 18px;
    }

    /* Nettoyage des anciennes surcharges individuelles */
    #about-button,
    #contact-button,
    #theme-toggle {
        top: auto !important;
        right: auto !important;
        left: auto !important;
        bottom: auto !important;
        position: relative !important;
    }

    #main-title {
        font-size: 17px !important;
        letter-spacing: 3px !important;
        top: 15px !important;
    }

    #ui-controls {
        top: 55px !important;
        bottom: auto !important;
        gap: 8px !important;
    }

    .ui-button {
        padding: 8px 12px !important;
        font-size: 9px !important;
        letter-spacing: 1px !important;
    }

    #theme-toggle {
        min-width: 40px !important;
        min-height: 40px !important;
        font-size: 13px !important;
    }
}