/* ============================================================
   France Mannaioni - Portfolio Artistique
   Mobile-first responsive design
   ============================================================ */

/* --- CUSTOM PROPERTIES --- */
:root {
    --color-bg-dark: rgba(0, 0, 0, 0.6);
    --color-bg-header: rgba(82, 82, 84, 1);
    --color-bg-content: linear-gradient(rgba(0, 0, 0, 0.9), rgba(50, 50, 50, 0.8));
    --color-bg-footer: rgba(41, 36, 36, 0.7);
    --color-text: #d0b394;
    --color-link: #5dade2;
    --color-link-hover: #d0b394;
    --color-menu: #e0d0c0;
    --color-menu-hover: #ba947b;
    --color-boutique: #5dade2;
    --color-title: #5dade2;
    --color-link-active: #3498db;
    --color-white: #fff;
    --color-light: #f0f0f0;
    --sidebar-width: 220px;
    --mobile-header-h: 56px;
    --touch-min: 44px;
    --font-body: Arial, sans-serif;
    --font-heading: 'Dancing Script', cursive;
    --font-nav: 'Corben', cursive;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* --- BASE (mobile-first) --- */
html {
    /* fallback statique pour iOS qui ignore background-attachment:fixed */
    background-color: #1a1a1a;
    min-height: 100%;
}

body {
    font-family: var(--font-body);
    font-size: clamp(14px, 1.6vw, 16px);
    line-height: 1.6;
    color: var(--color-text);
    background-color: transparent;
    -webkit-text-size-adjust: 100%;
}

/* Background image via pseudo-element (fix iOS fixed bg) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: url('../images/N-14-A-TOLE.jpg') center / cover no-repeat;
}

a { text-decoration: none; transition: color 0.3s; }
img { max-width: 100%; height: auto; display: block; }
h2 { font-family: var(--font-heading); }

.wrapper {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================================
   MOBILE HEADER & NAV (visible par defaut, mobile-first)
   ============================================================ */
#mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--mobile-header-h);
    background-color: var(--color-bg-header);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.mobile-logo {
    display: flex;
    align-items: center;
}

.mobile-logo-name {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 400;
    color: var(--color-white);
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--color-menu);
    font-size: 22px;
    cursor: pointer;
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- MOBILE NAV (accordeon avec sous-menus) --- */
#mobile-nav {
    position: fixed;
    top: var(--mobile-header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-bg-header);
    z-index: 1050;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: 8px 0 80px;
}

#mobile-nav.mobile-nav-open {
    transform: translateX(0);
}

#mobile-nav ul {
    list-style: none;
}

#mobile-nav > ul > li > a,
#mobile-nav > ul > li > .submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    color: var(--color-menu);
    font-size: 17px;
    min-height: var(--touch-min);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#mobile-nav .submenu-toggle {
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    text-align: left;
}

#mobile-nav .submenu-toggle::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
    transition: transform 0.3s;
    margin-left: 8px;
    flex-shrink: 0;
}

#mobile-nav .submenu-toggle.open::after {
    transform: rotate(180deg);
}

#mobile-nav .mobile-submenu {
    display: none;
    background-color: rgba(0, 0, 0, 0.3);
}

#mobile-nav .mobile-submenu.open {
    display: block;
}

#mobile-nav .mobile-submenu a {
    display: block;
    padding: 10px 20px 10px 36px;
    color: var(--color-menu);
    font-size: 16px;
    min-height: var(--touch-min);
    line-height: var(--touch-min);
    padding-top: 0;
    padding-bottom: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

#mobile-nav .mobile-submenu .mobile-submenu a {
    padding-left: 52px;
    font-size: 15px;
}

#mobile-nav a:hover,
#mobile-nav .submenu-toggle:hover {
    color: var(--color-menu-hover);
}

#mobile-nav a.menu-boutique,
#mobile-nav .submenu-toggle.menu-boutique {
    color: var(--color-boutique);
}

/* Icones sociales dans le menu mobile */
#mobile-nav .mobile-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 12px;
}

#mobile-nav .mobile-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-min);
    height: var(--touch-min);
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-menu);
    font-size: 16px;
    border: none;
    padding: 0;
    min-height: auto;
}

/* ============================================================
   SIDEBAR DESKTOP (cache par defaut, affiche a partir de 961px)
   ============================================================ */
#sidebar {
    display: none;
}

/* ============================================================
   SPACER (hero fullscreen avec background)
   ============================================================ */
#spacer {
    /* dvh = dynamic viewport height, fix mobile address bar */
    height: 100dvh;
    height: 100vh; /* fallback */
    padding-top: var(--mobile-header-h);
    position: relative;
}

#spacer .scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
    animation: bounce 2s infinite;
    cursor: pointer;
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-12px); }
    60% { transform: translateX(-50%) translateY(-6px); }
}

/* ============================================================
   HEADER BAR (sticky, sous le spacer)
   ============================================================ */
#header-bar {
    position: sticky;
    top: 0;
    z-index: 500;
    background-color: var(--color-bg-header);
    padding: 12px 0;
}

.header-custom {
    color: var(--color-light);
    font-size: clamp(13px, 1.5vw, 15px);
    text-align: center;
}

/* ============================================================
   CONTENU PRINCIPAL
   ============================================================ */
#site-wrapper {
    position: relative;
}

#main-content {
    background-image: var(--color-bg-content);
    padding: clamp(40px, 8vw, 100px) 0;
}

.blog-post {
    margin-bottom: clamp(28px, 5vw, 48px);
}

.blog-post:last-child {
    margin-bottom: 0;
}

.article-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5em, 4vw, 2.2em);
    color: var(--color-title);
    margin-bottom: clamp(12px, 2vw, 24px);
}

#main-content p {
    color: var(--color-text);
    text-shadow: 2px 2px 4px #000;
    margin-bottom: 12px;
    line-height: 1.8;
}

#main-content a { color: var(--color-link); }
#main-content a:hover { color: var(--color-link-hover); }

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
    background-color: var(--color-bg-footer);
    padding: clamp(16px, 3vw, 24px) 0;
}

#copyright {
    text-align: center;
    color: var(--color-white);
    font-size: clamp(11px, 1.2vw, 13px);
    margin-bottom: 10px;
}

#copyright a { color: var(--color-white); }

#footer-menu ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 16px;
}

#footer-menu ul li a {
    color: var(--color-menu);
    font-size: clamp(11px, 1.2vw, 13px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
    display: inline-block;
    padding: 4px 0;
    min-height: var(--touch-min);
    line-height: calc(var(--touch-min) - 8px);
}

#footer-menu ul li a:hover {
    border-bottom-color: var(--color-menu);
}

#footer-menu ul li a.menu-boutique {
    color: var(--color-boutique);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: .8rem;
    border-top: 1px solid rgba(255,255,255,.1);
}

.footer-social a {
    color: var(--color-text);
    font-size: 1.1rem;
    transition: color .2s, transform .2s;
}

.footer-social a:hover {
    color: var(--color-link);
    transform: scale(1.15);
}

/* ============================================================
   LIVRE D'OR (GUESTBOOK)
   ============================================================ */
.guestbook {
    max-width: 800px;
    margin: 0 auto;
}

/* Bouton "Écrire un mot" */
.gb-sign-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--color-link);
    color: var(--color-white);
    border: none;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    min-height: var(--touch-min);
    margin-bottom: 24px;
}

.gb-sign-btn:hover {
    background-color: var(--color-link-active);
}

/* Flash messages */
.flash {
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.flash-success {
    background-color: rgba(46, 125, 50, 0.15);
    color: #66bb6a;
    border: 1px solid rgba(46, 125, 50, 0.3);
}

/* Formulaire */
.gb-form-wrapper {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(208, 179, 148, 0.15);
    border-radius: 6px;
    padding: clamp(16px, 3vw, 28px);
    margin-bottom: 32px;
}

.gb-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.gb-field label {
    display: block;
    color: var(--color-menu);
    font-size: 13px;
    margin-bottom: 4px;
}

.gb-field input,
.gb-field select,
.gb-field textarea {
    width: 100%;
    padding: 10px 12px;
    background-color: rgba(250, 250, 250, 0.08);
    border: 1px solid var(--color-text);
    border-radius: 4px;
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 14px;
    min-height: var(--touch-min);
    transition: border-color 0.3s;
}

.gb-field input:focus,
.gb-field select:focus,
.gb-field textarea:focus {
    outline: none;
    border-color: var(--color-link);
    box-shadow: 0 0 0 2px rgba(227, 111, 53, 0.2);
}

.gb-field textarea {
    resize: vertical;
    min-height: 120px;
}

.gb-field select {
    appearance: auto;
    cursor: pointer;
}

.gb-field select option {
    background-color: #333;
    color: var(--color-white);
}

.gb-field .form-error-message,
.gb-field ul li {
    color: #ef5350;
    font-size: 12px;
    margin-top: 4px;
    list-style: none;
}

.gb-form-actions {
    margin-top: 20px;
}

.gb-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background-color: var(--color-link);
    color: var(--color-white);
    border: none;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    min-height: var(--touch-min);
}

.gb-submit-btn:hover {
    background-color: var(--color-link-active);
}

/* Entrées du livre d'or */
.gb-entries {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gb-empty {
    text-align: center;
    font-style: italic;
    opacity: 0.7;
    padding: 40px 0;
}

.gb-entry {
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(208, 179, 148, 0.1);
    border-radius: 6px;
    padding: clamp(14px, 2.5vw, 24px);
}

.gb-entry-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.gb-entry-author {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gb-name {
    font-size: clamp(15px, 1.6vw, 17px);
    color: var(--color-white);
}

.gb-meta {
    font-size: clamp(11px, 1.2vw, 13px);
    opacity: 0.65;
}

.gb-separator {
    margin: 0 4px;
}

.gb-entry-title {
    font-family: var(--font-heading);
    font-size: clamp(1.1em, 2.5vw, 1.4em);
    color: var(--color-title);
    margin-bottom: 8px;
}

.gb-entry-text {
    line-height: 1.7;
    color: var(--color-text);
}

/* Responsive formulaire guestbook */
@media (min-width: 480px) {
    .gb-form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gb-field-full {
        grid-column: 1 / -1;
    }
}

/* ============================================================
   PAGE CONTACT
   ============================================================ */
.contact-page {
    max-width: 900px;
    margin: 0 auto;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(24px, 4vw, 40px);
}

/* Bloc info */
.contact-info {
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(208, 179, 148, 0.1);
    border-radius: 6px;
    padding: clamp(16px, 3vw, 28px);
    text-align: center;
}

.contact-photo {
    margin-bottom: 16px;
}

.contact-photo img {
    width: clamp(120px, 25vw, 180px);
    height: auto;
    border-radius: 6px;
    margin: 0 auto;
}

.contact-person-name {
    font-family: var(--font-heading);
    font-size: clamp(1.3em, 3vw, 1.8em);
    color: var(--color-title);
    margin-bottom: 4px;
}

.contact-job {
    font-style: italic;
    opacity: 0.8;
    margin-bottom: 16px;
}

.contact-address {
    font-style: normal;
    margin-bottom: 12px;
    line-height: 1.7;
}

.contact-address i,
.contact-email-line i {
    color: var(--color-link);
    width: 20px;
    text-align: center;
    margin-right: 6px;
}

.contact-email-line a {
    color: var(--color-link);
}

.contact-email-line a:hover {
    color: var(--color-link-hover);
}

/* Formulaire */
.contact-form-section {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(208, 179, 148, 0.15);
    border-radius: 6px;
    padding: clamp(16px, 3vw, 28px);
}

.contact-form-title {
    font-family: var(--font-heading);
    font-size: clamp(1.1em, 2.5vw, 1.5em);
    color: var(--color-title);
    margin-bottom: 20px;
}

.cf-field {
    margin-bottom: 16px;
}

.cf-field label {
    display: block;
    color: var(--color-menu);
    font-size: 13px;
    margin-bottom: 4px;
}

.cf-field input,
.cf-field textarea {
    width: 100%;
    padding: 10px 12px;
    background-color: rgba(250, 250, 250, 0.08);
    border: 1px solid var(--color-text);
    border-radius: 4px;
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 14px;
    min-height: var(--touch-min);
    transition: border-color 0.3s;
}

.cf-field input:focus,
.cf-field textarea:focus {
    outline: none;
    border-color: var(--color-link);
    box-shadow: 0 0 0 2px rgba(227, 111, 53, 0.2);
}

.cf-field textarea {
    resize: vertical;
    min-height: 140px;
}

.cf-field .form-error-message,
.cf-field ul li {
    color: #ef5350;
    font-size: 12px;
    margin-top: 4px;
    list-style: none;
}

.cf-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cf-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: auto;
    accent-color: var(--color-link);
    cursor: pointer;
}

.cf-checkbox label {
    margin-bottom: 0;
    cursor: pointer;
    font-size: 13px;
}

.cf-actions {
    margin-top: 20px;
}

.cf-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background-color: var(--color-link);
    color: var(--color-white);
    border: none;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    min-height: var(--touch-min);
}

.cf-submit:hover {
    background-color: var(--color-link-active);
}

/* ============================================================
   BIOGRAPHIE
   ============================================================ */
.biography {
    max-width: 900px;
    margin: 0 auto;
}

.bio-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(20px, 4vw, 36px);
}

.bio-photo {
    text-align: center;
}

.bio-photo img {
    width: clamp(160px, 35vw, 240px);
    height: auto;
    border-radius: 6px;
    margin: 0 auto;
}

.bio-content {
    line-height: 1.8;
    font-size: clamp(16px, 1.8vw, 18px);
}

.bio-intro {
    font-size: clamp(17px, 1.9vw, 19px);
    margin-bottom: 24px;
    color: var(--color-white);
    text-shadow: 2px 2px 4px #000;
}

.bio-details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    margin-bottom: 24px;
    padding: clamp(14px, 2.5vw, 24px);
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(208, 179, 148, 0.1);
    border-radius: 6px;
}

.bio-details dt {
    font-family: var(--font-heading);
    font-size: clamp(1em, 1.8vw, 1.15em);
    color: var(--color-title);
    white-space: nowrap;
}

.bio-details dd {
    color: var(--color-text);
    text-shadow: 1px 1px 3px #000;
}

.bio-list {
    list-style: none;
    padding: 0;
}

.bio-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px #000;
}

.bio-list li::before {
    content: '\f06c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: var(--color-link);
    position: absolute;
    left: 0;
    top: 5px;
}

.bio-list a {
    color: var(--color-link);
}

.bio-list a:hover {
    color: var(--color-link-hover);
}

/* Responsive bio : photo à gauche sur tablette+ */
@media (min-width: 768px) {
    .bio-layout {
        grid-template-columns: 240px 1fr;
        align-items: start;
    }

    .bio-photo {
        position: sticky;
        top: 60px;
    }
}

/* Bio details en colonne sur petit mobile */
@media (max-width: 479px) {
    .bio-details {
        grid-template-columns: 1fr;
        gap: 4px 0;
    }

    .bio-details dt {
        margin-top: 10px;
    }

    .bio-details dt:first-child {
        margin-top: 0;
    }
}

/* Responsive contact : 2 colonnes sur tablette+ */
@media (min-width: 768px) {
    .contact-layout {
        grid-template-columns: 280px 1fr;
        align-items: start;
    }

    .contact-info {
        position: sticky;
        top: 60px;
    }
}

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 16px;
    width: var(--touch-min);
    height: var(--touch-min);
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 999;
    transition: background-color 0.3s, opacity 0.3s, visibility 0.3s;
    opacity: 0;
    visibility: hidden;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--color-white);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes slideInLeft {
    from { transform: translateX(-40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   BREAKPOINTS
   ============================================================ */

/* --- GRAND MOBILE / PETIT TABLET PORTRAIT (>=480px) --- */
@media (min-width: 480px) {
    .wrapper { width: 88%; }
}

/* --- TABLET PORTRAIT (>=768px) --- */
@media (min-width: 768px) {
    .wrapper { width: 85%; }

    #footer-menu ul {
        gap: 4px 24px;
    }

    /* 2 colonnes pour le footer menu en tablette */
    #footer-menu ul li a {
        min-height: auto;
        line-height: normal;
        padding: 2px 0;
    }
}

/* --- TABLET PAYSAGE / PETIT DESKTOP (>=961px) --- */
@media (min-width: 961px) {
    /* Afficher sidebar desktop, cacher mobile */
    #sidebar {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: var(--sidebar-width);
        height: 100%;
        background-color: var(--color-bg-dark);
        z-index: 1000;
        flex-direction: column;
        align-items: center;
        padding-top: 20px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    #mobile-header { display: none; }
    #mobile-nav { display: none !important; }

    #spacer {
        margin-left: var(--sidebar-width);
        padding-top: 0;
    }

    #header-bar {
        margin-left: var(--sidebar-width);
    }

    #site-wrapper {
        margin-left: var(--sidebar-width);
    }

    .wrapper { width: 86%; }
}

/* --- DESKTOP (>=1200px) --- */
@media (min-width: 1200px) {
    .wrapper { width: 80%; max-width: 1100px; }
}

/* --- GRAND ECRAN (>=1600px) --- */
@media (min-width: 1600px) {
    :root {
        --sidebar-width: 250px;
    }

    .wrapper { max-width: 1300px; }

    #hornav > ul > li > a {
        font-size: 17px;
        padding: 10px 24px;
    }
}

/* --- ORIENTATION PAYSAGE MOBILE (hauteur limitee) --- */
@media (max-height: 500px) and (orientation: landscape) {
    #spacer {
        height: auto;
        min-height: 300px;
        padding-top: var(--mobile-header-h);
    }

    #spacer .scroll-hint {
        display: none;
    }

    #mobile-nav {
        padding-bottom: 20px;
    }

    #mobile-nav > ul > li > a,
    #mobile-nav > ul > li > .submenu-toggle {
        padding: 6px 20px;
        min-height: 36px;
        font-size: 15px;
    }
}

/* --- ORIENTATION PAYSAGE TABLETTE (compacte le header) --- */
@media (min-width: 768px) and (max-width: 960px) and (orientation: landscape) {
    #spacer {
        height: 70vh;
    }
}

/* ============================================================
   SIDEBAR DESKTOP - DETAILS
   ============================================================ */
#logo {
    margin-bottom: 20px;
    padding: 0 16px;
    text-align: center;
}

#logo a {
    display: block;
    color: var(--color-white);
}

#logo a:hover {
    color: var(--color-menu);
}

.logo-name {
    font-family: var(--font-heading);
    font-size: clamp(22px, 2.2vw, 28px);
    font-weight: 400;
    color: var(--color-white);
    line-height: 1.2;
    margin: 0;
}

.logo-tagline {
    font-family: var(--font-heading);
    font-size: clamp(13px, 1.3vw, 15px);
    font-weight: 400;
    color: var(--color-white);
    opacity: 0.85;
    margin-top: 2px;
}

/* --- NAVIGATION SIDEBAR --- */
#hornav {
    width: 100%;
    font-family: var(--font-nav);
}

#hornav ul {
    list-style: none;
}

#hornav > ul > li > a {
    display: block;
    padding: 10px 20px;
    color: var(--color-menu);
    font-size: 16px;
    transition: color 0.3s;
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
}

#hornav > ul > li > a:hover,
#hornav > ul > li.active > a {
    color: var(--color-menu-hover);
}

#hornav > ul > li > a.menu-boutique {
    color: var(--color-boutique);
}

#hornav > ul > li > a.menu-boutique:hover {
    color: var(--color-menu-hover);
}

/* Sous-menus desktop */
#hornav .submenu {
    display: none;
    background-color: rgba(0, 0, 0, 0.95);
}

#hornav .has-submenu {
    position: relative;
}

#hornav .has-submenu > a::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 9px;
    margin-left: auto;
    padding-left: 8px;
    opacity: 0.5;
}

#hornav .has-submenu:hover > .submenu {
    display: block;
    position: fixed;
    left: var(--sidebar-width);
    min-width: 220px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.2) transparent;
}

#hornav .has-submenu:hover > .submenu::-webkit-scrollbar {
    width: 5px;
}
#hornav .has-submenu:hover > .submenu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.2);
    border-radius: 3px;
}

/* Sous-sous-menus */
#hornav .submenu .has-submenu:hover > .submenu {
    left: calc(var(--sidebar-width) + 220px);
}

#hornav .submenu li a {
    display: block;
    padding: 10px 20px;
    color: var(--color-menu);
    font-size: 14px;
    transition: color 0.3s, background-color 0.3s;
    min-height: var(--touch-min);
    line-height: 1.4;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

#hornav .submenu li a:hover {
    color: var(--color-menu-hover);
    background-color: rgba(0, 0, 0, 0.6);
}

/* --- ICONES SOCIALES SIDEBAR --- */
#social {
    margin-top: auto;
    padding: 20px 0;
}

#social ul {
    list-style: none;
    display: flex;
    gap: 10px;
    justify-content: center;
}

#social ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-menu);
    font-size: 14px;
    transition: background-color 0.3s;
}

#social ul li a:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

/* ============================================================
   SAFE AREA (encoche iPhone etc.)
   ============================================================ */
@supports (padding: env(safe-area-inset-bottom)) {
    #mobile-header {
        padding-left: calc(16px + env(safe-area-inset-left));
        padding-right: calc(16px + env(safe-area-inset-right));
    }

    #mobile-nav {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }

    .scroll-top {
        bottom: calc(20px + env(safe-area-inset-bottom));
        right: calc(16px + env(safe-area-inset-right));
    }
}

/* ============================================================
   EXHIBITIONS
   ============================================================ */
.exhibition-timeline {
    max-width: 700px;
}

.exhibition-year {
    font-family: var(--font-heading);
    color: var(--color-title);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    margin-top: 1.5rem;
    margin-bottom: .5rem;
    padding-bottom: .3rem;
    border-bottom: 1px solid rgba(227,111,53,.25);
}

.exhibition-year:first-child {
    margin-top: 0;
}

.exhibition-year-group {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding-left: 1rem;
}

.exhibition-entry {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem .8rem;
    padding: .4rem 0;
    color: var(--color-light);
    line-height: 1.5;
}

.exhibition-entry .exhibition-location {
    color: var(--color-text);
    font-size: .9rem;
    min-width: 180px;
}

.exhibition-entry .exhibition-location i {
    color: var(--color-link);
    margin-right: .3rem;
    font-size: .8rem;
}

.exhibition-entry .exhibition-title {
    color: var(--color-light);
    font-size: .95rem;
}

.exhibition-entry.is-personal .exhibition-title {
    font-weight: 600;
}

/* ============================================================
   GALLERY LISTING
   ============================================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: clamp(1rem, 2.5vw, 1.5rem);
}

.gallery-card {
    display: block;
    text-decoration: none;
    background: rgba(255,255,255,.05);
    border-radius: 8px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}

.gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.4);
}

.gallery-card-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: rgba(0,0,0,.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.gallery-card:hover .gallery-card-thumb img {
    transform: scale(1.05);
}

.gallery-card-empty {
    font-size: 2.5rem;
    color: rgba(255,255,255,.2);
}

.gallery-card-info {
    padding: .9rem 1.1rem;
    font-size: clamp(.95rem, 1.7vw, 1.05rem);
}

.gallery-card-info h3 {
    font-family: var(--font-heading);
    color: var(--color-title);
    font-size: clamp(1.15rem, 2.3vw, 1.4rem);
    margin-bottom: .25rem;
}

.gallery-year {
    font-size: .8rem;
    color: var(--color-text);
    margin-right: .8rem;
}

.gallery-count {
    font-size: .8rem;
    color: rgba(255,255,255,.5);
}

/* ============================================================
   GALLERY DETAIL + MOSAIC
   ============================================================ */
.gallery-description {
    color: var(--color-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: clamp(16px, 1.8vw, 18px);
}

.gallery-mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: clamp(.5rem, 1.5vw, 1rem);
}

.gallery-item {
    overflow: hidden;
    border-radius: 4px;
    background: rgba(0,0,0,.3);
}

.gallery-item a {
    display: block;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    transition: transform .3s, opacity .2s;
    cursor: pointer;
}

.gallery-item:hover img {
    transform: scale(1.05);
    opacity: .9;
}

.gallery-item figcaption {
    padding: .4rem .6rem;
    font-size: .75rem;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-back {
    margin-top: 2rem;
}

.gallery-back a {
    color: var(--color-link);
    text-decoration: none;
}

.gallery-back a:hover {
    color: var(--color-link-hover);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,.92);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox[hidden] { display: none; }

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-caption {
    color: var(--color-text);
    margin-top: .8rem;
    font-size: .9rem;
    text-align: center;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
    padding: .5rem;
    opacity: .7;
    transition: opacity .2s;
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }

.lightbox-close { top: 1rem; right: 1.5rem; font-size: 2.5rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 480px) {
    .gallery-mosaic {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .lightbox-prev { left: .3rem; }
    .lightbox-next { right: .3rem; }
}

/* ============================================================
   ERROR PAGES
   ============================================================ */
.error-page {
    text-align: center;
    padding: 3rem 1rem;
}

.error-content {
    max-width: 500px;
    margin: 0 auto;
}

.error-code {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: 1rem;
    opacity: .6;
}

.error-content p {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-error {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem 1.2rem;
    border: 1px solid var(--color-accent);
    border-radius: 4px;
    color: var(--color-text);
    text-decoration: none;
    font-size: .9rem;
    transition: background .2s, color .2s;
}

.btn-error:hover {
    background: var(--color-accent);
    color: var(--color-white);
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    #sidebar, #mobile-header, #mobile-nav, #spacer,
    #header-bar, #footer, .scroll-top, .scroll-hint { display: none !important; }
    #site-wrapper { margin-left: 0 !important; }
    #main-content { background: none; padding: 0; }
    body::before { display: none; }
    body { color: #000; font-size: 12pt; }
    .article-title { color: #333; }
    #main-content p { color: #000; text-shadow: none; }
}
