/* ============================================================
   common.css — Styles partagés : variables, header, footer
   À inclure dans toutes les pages du site.
   ============================================================ */

/* --- Variables globales --- */
:root {
    --manouche-rouge: #d62828;
    --flamenco-or: #ffd700;
    --tzigane-noir: #1a1a1a;
    --bois-clair: #deb887;
    --creme: #f5f5dc;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.4s ease;
    --header-height: 120px;
    --bleu-turquoise: #159276;
}

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

/* ============================================================
   HEADER
   ============================================================ */
header {
    background-color: rgba(255, 255, 255, 1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    padding: 0 2rem;
}

.header-content {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    height: 100%;
    width: 100%;
    margin-bottom: 3rem;
}

/* Logo / nom */
#logo {
    font-family: Calibri, sans-serif;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--tzigane-noir);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    line-height: 1;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: flex-end;
    height: 100%;
    cursor: pointer;
}

/* Navigation desktop */
nav {
    display: flex;
    align-items: flex-end;
    height: 100%;
    margin-left: 1rem;
    width: 100%;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: flex-end;
    margin: 0;
    padding: 0;
    height: 100%;
}

nav ul li a {
    position: relative;
    padding-bottom: 0.2rem;
    text-decoration: none;
    color: var(--tzigane-noir);
    font-weight: 500;
    transition: var(--transition);
    font-family: Calibri, sans-serif;
    font-size: 1.1rem;
    line-height: 1;
}

nav ul li a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: black;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Boutons d'action dans la nav desktop */
.nav-buttons {
    display: flex;
    gap: 1rem;
    margin-left: auto;
    margin-bottom: -0.6rem;
    align-items: flex-end;
    height: 100%;
}

nav .boutique-button {
    background-color: white;
    color: black !important;
    border: 1px solid black;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    margin-bottom: 0.2rem;
    text-decoration: none !important;
}

nav .boutique-button::after {
    display: none !important;
}

nav .boutique-button:hover {
    background-color: black;
    color: white !important;
}

/* Menu hamburger (masqué sur desktop) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--tzigane-noir);
    cursor: pointer;
    z-index: 1001;
    margin-bottom: 0.3rem;
}

/* Menu déroulant mobile */
.menu-dropdown {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    box-shadow: var(--shadow);
    z-index: 1000;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-dropdown a {
    text-decoration: none;
    color: var(--tzigane-noir);
    font-weight: 500;
    padding: 0.5rem;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    border-radius: 4px;
    transition: var(--transition);
}

.menu-dropdown a:hover {
    color: var(--bleu-turquoise);
    background: rgba(21, 146, 118, 0.08);
}

.menu-dropdown .boutique-button {
    background-color: var(--bleu-turquoise);
    color: white !important;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.8rem;
    display: block;
    margin-top: 0.5rem;
}

.menu-dropdown.active {
    display: flex;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    text-align: center;
    padding: 1.5rem;
    background: black;
    color: var(--creme);
}

.footer-social {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-social p {
    font-family: Calibri, sans-serif;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.footer-social-icons {
    display: flex;
    gap: 1rem;
}

.footer-social-icons a {
    color: var(--creme);
    font-size: 1.3rem;
    transition: var(--transition);
}

.footer-social-icons a:hover {
    color: var(--bleu-turquoise);
    transform: scale(1.1);
}


/* ============================================================
   SÉLECTEUR DE LANGUE TEXTE (FR / ENG / ESP)
   Toujours visible sur mobile et tablette, caché sur desktop
   ============================================================ */
.lang-switcher-text {
    display: none;   /* caché par défaut — affiché via media queries */
    align-items: center;
    gap: 0.15rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.lang-text-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: Calibri, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #888;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.25rem;
    transition: color 0.2s ease;
    line-height: 1;
}

.lang-text-btn:hover {
    color: var(--bleu-turquoise);
}

.lang-text-btn.active {
    color: var(--bleu-turquoise);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lang-sep {
    color: #ccc;
    font-size: 0.7rem;
    line-height: 1;
    user-select: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 768px) {
    :root {
        --header-height: 120px;
    }

    .lang-switcher-text {
        display: none !important;
    }

    .menu-toggle {
        display: none;
    }

    .menu-dropdown {
        display: none !important;
    }

    .menu-dropdown.active {
        display: none !important;
    }
}

@media (max-width: 767px) {
    :root { --header-height: 60px; }

    header { padding: 0 1rem; }

    .header-content {
        margin-bottom: 0;
        align-items: center;
    }

    #logo {
        font-size: 1.5rem;
        align-items: center;
        margin-bottom: 0;
        height: auto;
    }

    nav ul,
    .nav-buttons,
    .lang-switcher:not(.lang-switcher--mobile) {
        display: none !important;
    }

    .lang-switcher-text {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
    }

    .nav-buttons {
        display: none;
    }
}

/* ============================================================
   SÉLECTEUR DE LANGUE
   ============================================================ */
.lang-switcher {
    display: flex;
    align-items: flex-end;
    gap: 0.2rem;
    margin-left: 1.2rem;
    margin-bottom: 0.25rem;
    flex-shrink: 0;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0.15rem 0.2rem;
    border-radius: 4px;
    opacity: 0.4;
    transition: opacity 0.25s ease, transform 0.2s ease;
    position: relative;
}

.lang-btn:hover {
    opacity: 0.85;
    transform: scale(1.15);
}

.lang-btn.active {
    opacity: 1;
    transform: scale(1.1);
}

/* Petit trait sous le drapeau actif */
.lang-btn.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 2px;
    background-color: var(--bleu-turquoise);
    border-radius: 2px;
}

/* Version mobile — dans le menu déroulant */
.lang-switcher--mobile {
    justify-content: center;
    margin: 0.5rem 0 0;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0,0,0,0.08);
    width: 100%;
}

.lang-switcher--mobile .lang-btn {
    font-size: 1.6rem;
    padding: 0.3rem 0.4rem;
}

@media (max-width: 767px) {
    .lang-switcher:not(.lang-switcher--mobile) {
        display: none;
    }
}

/* ============================================================
   RESPONSIVE — TABLETTE (768px – 1023px)
   ============================================================ */
@media (min-width: 768px) and (max-width: 1023px) {
    :root { --header-height: 72px; }

    header { padding: 0 1.5rem; }

    .header-content {
        margin-bottom: 0;
        align-items: center;
    }

    #logo {
        font-size: 2rem;
        align-items: center;
        margin-bottom: 0;
        height: auto;
    }

    nav ul,
    .nav-buttons,
    .lang-switcher:not(.lang-switcher--mobile) {
        display: none !important;
    }

    .lang-switcher-text {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}
