/* ═══════════════════════════════════════════════
   SIDEBAR MENU — Matsukaze Bordeaux
   0. Polices & variables
   1. Sidebar desktop
   2. Logo
   3. Hamburger → croix
   4. Icônes réseaux sociaux
   5. Drawer desktop
   6. Overlay
   7. Sélecteur de langue
   8. Header & Nav mobile
   9. Media queries
   ═══════════════════════════════════════════════ */


/* ───── 0. POLICES & VARIABLES ───── */
@font-face {
    font-family: 'Caviar Dreams';
    src: url('../fonts/CaviarDreams.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Caviar Dreams';
    src: url('../fonts/CaviarDreams_Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Caviar Dreams';
    src: url('../fonts/CaviarDreams_Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'Caviar Dreams';
    src: url('../fonts/CaviarDreams_BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

:root {
    --color-green:  #7a9e6e;
    --color-white:  #fff;
    --font-body:    'Inter', sans-serif;
}


/* ───── 1. SIDEBAR ───── */
#sidebar-menu {
    position: fixed;
    left: 0;
    top: 0;
    width: 110px;
    height: min(100vh, 1080px);
    background: var(--color-green);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0 30px;
    box-sizing: border-box;
    border-bottom-right-radius: 25px;
    transition: border-bottom-right-radius .4s ease;
}

body:has(#drawer-nav.open) #sidebar-menu {
    border-bottom-right-radius: 0;
}

#menu-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}


/* ───── 2. LOGO ───── */
.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 2px;
    padding: 0 4px;
}

.sidebar-logo .logo-bonsai {
    width: 72px;        
    height: auto;
    margin-bottom: 4px;
}

.sidebar-logo .logo-texte {
    width: 100px;       
    height: auto;
    display: block;
    margin-left: 10px;
}

.sidebar-logo .logo-kanji {
    width: 66px;        /* était 55px */
    height: auto;
    margin-top: 14px;
	display: none;
}


/* ───── 3. HAMBURGER → CROIX ───── */
#menu-toggle {
    cursor: pointer;
    text-align: center;
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--color-white);
    margin: 4px auto;
    transition: transform .3s ease, opacity .3s ease;
}

#menu-toggle p {
    color: var(--color-white);
    font-family: 'Caviar Dreams', sans-serif;
    font-size: 10px;
    font-weight: 400;
    margin-top: 6px;
    letter-spacing: 1px;
}

#menu-toggle.open span:nth-of-type(1) { transform: translateY(11px)  rotate(45deg); }
#menu-toggle.open span:nth-of-type(2) { opacity: 0; transform: scaleX(0); }
#menu-toggle.open span:nth-of-type(3) { transform: translateY(-11px) rotate(-45deg); }


/* ───── 4. ICÔNES RÉSEAUX SOCIAUX ───── */
.sidebar-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.sidebar-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity .2s;
}

.sidebar-social a:hover { opacity: 0.6; }


/* ───── 5. DRAWER ───── */
#drawer-nav {
    position: fixed;
    top: 0;
    left: 110px;
    width: 0;
    height: min(100vh, 1080px);
    background: var(--color-green);
    overflow-x: hidden;
    overflow-y: auto;
    transition: width .4s ease;
    z-index: 999;
    padding-top: 80px;
    box-sizing: border-box;
    border-bottom-right-radius: 25px;
}

#drawer-nav.open {
    width: 700px;
    padding-left: 50px;
}

#drawer-nav .drawer-links,
#drawer-nav .drawer-links li {
    list-style: none;
    padding: 0;
    margin: 0;
}

#drawer-nav .drawer-links li a {
    color: var(--color-white);
    font-family: 'Caviar Dreams', sans-serif;
    font-size: 30px;
    font-weight: 400;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    transform: translateX(0);
    transition: transform .25s ease, opacity .2s;
}

#drawer-nav .drawer-links li a::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 32px;
    overflow: hidden;
    flex-shrink: 0;
    transition: width .25s ease;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='20' x2='7' y2='20'/%3E%3Cpath d='M 12 20 L 24 20 A 4 4 0 1 0 20 16'/%3E%3Cpath d='M 5 26 L 35 26 A 6 6 0 1 0 29 20'/%3E%3Cline x1='13' y1='32' x2='16' y2='32'/%3E%3Cpath d='M 21 32 L 36 32 A 5 5 0 1 1 31 37'/%3E%3C/svg%3E") no-repeat center / contain;
}

#drawer-nav .drawer-links li a:hover            { transform: translateX(10px); }
#drawer-nav .drawer-links li a:hover::before    { width: 40px; }

.drawer-content[hidden] { display: none; }


/* ───── 6. OVERLAY ───── */
#drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 998;
}

#drawer-overlay.active { display: block; }


/* ───── 7. SÉLECTEUR DE LANGUE ───── */

/* Bouton icône (mobile header / mobile drawer) */
.lang-switcher {
    position: relative;
    display: inline-block;
}

.lang-switcher .icon-lang {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: opacity .2s;
}

.lang-switcher .icon-lang:hover { opacity: 0.7; }

.lang-switcher .icon-lang img {
    width: 32px;
    height: 32px;
    display: block;
}

/* Dropdown */
.lang-list {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
    min-width: 70px;
    z-index: 1100;
}

.lang-list[hidden] { display: none; }

.lang-item { margin: 0; padding: 0; list-style: none; }

.lang-item a {
    display: block;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    color: #2a4500;
    font-family: 'Caviar Dreams', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    transition: background .2s, color .2s;
}

.lang-item a:hover           { background: #f2f7ec; }
.lang-item.is-current a      { background: var(--color-green); color: #fff; }

.lang-switcher--drawer .lang-list { right: 0; left: auto; }

/* Bouton langue sidebar desktop */
.sidebar-lang-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: opacity .2s;
}

.sidebar-lang-toggle:hover  { opacity: 0.75; }

.sidebar-lang-toggle img {
    width: 28px;
    height: 28px;
    display: block;
    filter: brightness(0) invert(1);
}

.sidebar-lang-toggle.is-active img {
    filter: brightness(0) saturate(100%) invert(85%) sepia(50%) saturate(500%) hue-rotate(5deg);
}

.sidebar-lang-toggle p {
    color: var(--color-white);
    font-family: 'Caviar Dreams', sans-serif;
    font-size: 10px;
    font-weight: 400;
    margin: 0;
    letter-spacing: 1px;
}

.sidebar-lang-toggle.is-active p { text-decoration: underline; }

/* Bouton custom sidebar desktop */
.sidebar-custom-btn {
    /*display: flex;*/
	display: none;
    align-items: center;
    justify-content: center;
    width: 100px;          /* 10px de moins que la sidebar (110px) */
    margin-top: 12px;
    transition: opacity .2s, transform .2s;
}

.sidebar-custom-btn:hover { opacity: 0.75; transform: translateY(-2px); }

.sidebar-custom-btn img {
    width: 100%;           /* occupe les 100px du bouton */
    height: auto;
    display: block;
}

/* Liste des langues dans le drawer desktop */
.drawer-lang-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-lang-item { list-style: none; padding: 0; margin: 0; }

.drawer-lang-item a {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 14px 0;
    color: var(--color-white);
    font-family: 'Caviar Dreams', sans-serif;
    text-decoration: none;
    transition: transform .25s ease, opacity .2s;
}

.drawer-lang-item a:hover           { transform: translateX(10px); }
.drawer-lang-item.is-current a      { opacity: 0.6; pointer-events: none; }

.drawer-lang-code {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 2px;
}

.drawer-lang-name {
    font-size: 22px;
    font-weight: 400;
    opacity: 0.85;
}

.drawer-lang-item.is-current .drawer-lang-code {
    text-decoration: underline;
    text-underline-offset: 6px;
}


/* ───── 8. MOBILE (état caché par défaut) ───── */
#mobile-header,
#mobile-nav {
    display: none;
}


/* ═══════════════════════════════════════════════
   9. MEDIA QUERIES
   ═══════════════════════════════════════════════ */

/* ───── TABLETTE / PETIT LAPTOP (783px – 1366px) ───── */
@media (min-width: 783px) and (max-width: 1366px) {

    #sidebar-menu { padding: 15px 0 20px; }

	.sidebar-logo .logo-bonsai  { width: 58px; }
    .sidebar-logo .logo-texte   { width: 80px; }
    .sidebar-logo .logo-kanji   { width: 55px; margin-top: 10px; }

    #menu-toggle span           { width: 24px; height: 2px; margin: 3px auto; }
    #menu-toggle.open span:nth-of-type(1) { transform: translateY(8px)  rotate(45deg); }
    #menu-toggle.open span:nth-of-type(3) { transform: translateY(-8px) rotate(-45deg); }
    #menu-toggle p              { font-size: 9px; margin-top: 4px; }

    .sidebar-social             { gap: 12px; }
    .sidebar-social a svg       { width: 20px; height: 20px; }

    .sidebar-lang-toggle img    { width: 22px; height: 22px; }
    .sidebar-lang-toggle p      { font-size: 9px; }

    .drawer-lang-code           { font-size: 34px; }
    .drawer-lang-name           { font-size: 18px; }
}

/* ───── ÉCRAN TRÈS COURT (hauteur ≤ 783px) ───── */
@media (min-width: 783px) and (max-height: 750px) {

    #sidebar-menu               { padding: 12px 0 15px; }

    .sidebar-logo .logo-bonsai  { width: 40px; margin-bottom: 2px; }
    .sidebar-logo .logo-texte   { width: 55px; }
    .sidebar-logo .logo-kanji   { width: 38px; margin-top: 6px; }

    .sidebar-social             { gap: 10px; }
    .sidebar-social a svg       { width: 18px; height: 18px; }

    #menu-toggle p              { font-size: 9px; margin-top: 3px; }
}

/* ───── MOBILE (≤ 782px) ───── */
@media (max-width: 782px) {

    #sidebar-menu,
    #drawer-nav { display: none; }

    /* Header fixe */
    #mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 70px;
        background: transparent;
        z-index: 1000;
        padding: 0 20px;
        box-sizing: border-box;
        transition: background .3s ease;
    }

    #mobile-header.scrolled             { background: var(--color-green); }
    body.mobile-nav-open #mobile-header { background: var(--color-green); }

    /* Bouton burger */
    #mobile-menu-toggle {
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding: 0;
    }

    #mobile-menu-toggle span {
        display: block;
        width: 28px;
        height: 3px;
        background: var(--color-white);
        border-radius: 2px;
        transition: transform .3s ease, opacity .3s ease;
    }

    /* Icônes header */
    .mobile-header-icons {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .mobile-header-icons a          { display: flex; align-items: center; transition: opacity .2s; }
    .mobile-header-icons a:hover    { opacity: 0.7; }
    .mobile-header-icons .icon-lang img     { width: 32px; height: 32px; display: block; }
    .mobile-header-icons .icon-festival img { width: 48px; height: 48px; /*display: block;*/ display: none; }

    /* Drawer mobile plein écran */
    #mobile-nav.open {
        display: flex;
        position: fixed;
        inset: 0;
        background: var(--color-green);
        z-index: 1001;
        padding: 110px 30px 40px;
        box-sizing: border-box;
        flex-direction: column;
    }

    #mobile-close {
        position: absolute;
        top: 18px;
        left: 20px;
        background: none;
        border: none;
        color: var(--color-white);
        font-size: 1.8rem;
        cursor: pointer;
        line-height: 1;
    }

    /* Icônes drawer mobile */
    .mobile-nav-icons {
        position: absolute;
        top: 18px;
        right: 20px;
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .mobile-nav-icons a                     { display: flex; align-items: center; }
    .mobile-nav-icons .icon-lang img        { width: 32px; height: 32px; display: block; }
    .mobile-nav-icons .icon-festival img    { width: 48px; height: 48px; display: block; }

    /* Liens du menu mobile */
    #mobile-nav .mobile-links,
    #mobile-nav .mobile-links li { list-style: none; padding: 0; margin: 0; }

    #mobile-nav .mobile-links { margin: 0 0 30px; width: 100%; }

    #mobile-nav .mobile-links li a {
        color: var(--color-white);
        font-family: 'Caviar Dreams', sans-serif;
        font-size: 1.4rem;
        font-weight: 400;
        text-decoration: none;
        display: block;
        padding: 10px 0;
        transition: opacity .2s;
    }

    #mobile-nav .mobile-links li:first-child a {
        font-family: 'Calistoga', serif;
        font-size: 2rem;
        font-weight: 400;
    }

    #mobile-nav .mobile-links li a:hover { opacity: .7; }

    /* Réseaux sociaux mobile */
    .sidebar-social-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 24px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.25);
        margin-top: 10px;
    }

    .sidebar-social-mobile a            { display: flex; align-items: center; opacity: 0.9; transition: opacity .2s; }
    .sidebar-social-mobile a:hover      { opacity: 0.6; }
}

/* Réserve l'espace de la sidebar : rien ne passe dessous (desktop) */
@media (min-width: 783px) {
    body {
        padding-left: 110px;   /* = largeur de la sidebar */
        box-sizing: border-box;
    }
}