/* =============================================================================
   common.css — Fid & Gest — Identité visuelle Anthracite / Safran
   ============================================================================= */

/* ── Variables de couleurs ──────────────────────────────────────────────────── */
:root {
    --color-anthracite:   #2A2A2A;   /* Fond sombre principal */
    --color-anthracite-2: #383838;   /* Fond sombre secondaire */
    --color-anthracite-3: #464646;   /* Bordures sombres */
    --color-safran:       #D4A017;   /* Accent — safran */
    --color-safran-light: #E8B832;   /* Safran clair hover */
    --color-safran-pale:  #FDF3D7;   /* Safran très pale (bg sections) */
    --color-ivory:        #FAF7F0;   /* Fond ivoire chaud */
    --color-ivory-2:      #F2EDE4;   /* Ivoire légèrement plus sombre */
    --color-text:         #1A1A1A;   /* Texte principal */
    --color-text-muted:   #6B6B6B;   /* Texte secondaire */
    --color-text-light:   #9A9A9A;   /* Texte léger */
    --color-white:        #FFFFFF;
    --color-border:       #E8E3DA;   /* Bordure légère */
    --color-success:      #3A7D52;
    --color-error:        #C0392B;

    /* Typographie */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body:    'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;

    /* Espacements */
    --space-xs:   0.25rem;
    --space-sm:   0.5rem;
    --space-md:   1rem;
    --space-lg:   1.5rem;
    --space-xl:   2.5rem;
    --space-2xl:  4rem;
    --space-3xl:  6rem;

    /* Conteneur */
    --container:  1200px;
    --container-narrow: 800px;

    /* Border radius */
    --radius-sm:  4px;
    --radius-md:  8px;
    --radius-lg:  16px;

    /* Transitions */
    --trans:      0.25s ease;
    --trans-slow: 0.45s ease;

    /* Ombre */
    --shadow-sm:  0 2px 8px rgba(0,0,0,.08);
    --shadow-md:  0 4px 20px rgba(0,0,0,.12);
    --shadow-lg:  0 8px 40px rgba(0,0,0,.16);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-ivory);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-safran); text-decoration: none; transition: color var(--trans); }
a:hover { color: var(--color-safran-light); }

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-anthracite);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p { margin-bottom: var(--space-md); }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5rem; }
li { margin-bottom: var(--space-xs); }

/* ── Conteneur ────────────────────────────────────────────────────────────── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.container--narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ── Section ──────────────────────────────────────────────────────────────── */
.section { padding: var(--space-3xl) 0; }
.section--sm { padding: var(--space-2xl) 0; }
.section--dark { background: var(--color-anthracite); color: var(--color-ivory); }
.section--dark h2, .section--dark h3, .section--dark h4 { color: var(--color-ivory); }
.section--ivory { background: var(--color-ivory); }
.section--ivory-2 { background: var(--color-ivory-2); }
.section--safran-pale { background: var(--color-safran-pale); }

.section-eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-safran);
    margin-bottom: var(--space-sm);
}

.section-header {
    margin-bottom: var(--space-2xl);
}

.section-header--center { text-align: center; }

.section-sub {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
    max-width: 600px;
}

.section-header--center .section-sub { margin-left: auto; margin-right: auto; }

/* ── NAVBAR ───────────────────────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(42,42,42,.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-anthracite-3);
    transition: box-shadow var(--trans);
}

.navbar.scrolled { box-shadow: var(--shadow-md); }

.navbar__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-xl);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.navbar__logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    flex-shrink: 0;
}

.navbar__logo-mark {
    width: 42px;
    height: 42px;
    background: var(--color-safran);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-anthracite);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.navbar__logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.navbar__logo-name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-white);
    letter-spacing: 0.02em;
}

.navbar__logo-sub {
    font-size: 0.68rem;
    font-weight: 400;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.navbar__nav {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    list-style: none;
    padding: 0;
    margin: 0;
}

.navbar__nav a {
    display: block;
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255,255,255,.75);
    border-radius: var(--radius-sm);
    transition: color var(--trans), background var(--trans);
    white-space: nowrap;
}

.navbar__nav a:hover,
.navbar__nav a.active {
    color: var(--color-white);
    background: rgba(255,255,255,.08);
}

.navbar__nav a.active { color: var(--color-safran); }

.navbar__actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

/* Sélecteur de langue */
.lang-switcher {
    position: relative;
}

.lang-switcher__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,.75);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--trans);
}

.lang-switcher__btn:hover {
    border-color: var(--color-safran);
    color: var(--color-safran);
}

.lang-switcher__btn img {
    width: 18px;
    height: 18px;
    border-radius: 2px;
    object-fit: cover;
}

.lang-switcher__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--color-anthracite-2);
    border: 1px solid var(--color-anthracite-3);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 130px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: all var(--trans);
    z-index: 10;
}

.lang-switcher:hover .lang-switcher__dropdown,
.lang-switcher__dropdown.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.lang-switcher__dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,.75);
    transition: all var(--trans);
}

.lang-switcher__dropdown a:hover,
.lang-switcher__dropdown a.current {
    background: rgba(255,255,255,.08);
    color: var(--color-safran);
}

.lang-switcher__dropdown a img {
    width: 18px; height: 18px;
    border-radius: 2px;
    object-fit: cover;
}

/* Burger mobile */
.navbar__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.navbar__burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: all var(--trans);
}

/* ── Boutons ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--trans);
    text-decoration: none;
    border: 2px solid transparent;
    line-height: 1;
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-safran);
    color: var(--color-anthracite);
    border-color: var(--color-safran);
}
.btn--primary:hover {
    background: var(--color-safran-light);
    border-color: var(--color-safran-light);
    color: var(--color-anthracite);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212,160,23,.35);
}

.btn--outline {
    background: transparent;
    color: var(--color-ivory);
    border-color: rgba(255,255,255,.4);
}
.btn--outline:hover {
    border-color: var(--color-safran);
    color: var(--color-safran);
    background: rgba(212,160,23,.08);
}

.btn--outline-dark {
    background: transparent;
    color: var(--color-anthracite);
    border-color: var(--color-anthracite-3);
}
.btn--outline-dark:hover {
    border-color: var(--color-safran);
    color: var(--color-safran);
}

.btn--sm { padding: 0.55rem 1.2rem; font-size: 0.82rem; }
.btn--lg { padding: 1rem 2.25rem; font-size: 1rem; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--trans), transform var(--trans);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card__body { padding: var(--space-xl); }
.card__icon {
    width: 48px; height: 48px;
    background: var(--color-safran-pale);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: var(--space-lg);
    color: var(--color-safran);
}
.card__title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-anthracite);
}
.card__text { color: var(--color-text-muted); font-size: 0.95rem; }

/* ── Grilles ──────────────────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xl); }

/* ── Icônes SVG inline ────────────────────────────────────────────────────── */
.icon { width: 24px; height: 24px; display: inline-block; flex-shrink: 0; }
.icon--sm { width: 18px; height: 18px; }
.icon--lg { width: 32px; height: 32px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
    background: var(--color-anthracite);
    color: rgba(255,255,255,.65);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer__logo-mark {
    width: 44px; height: 44px;
    background: var(--color-safran);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 1.1rem; font-weight: 700;
    color: var(--color-anthracite);
    margin-bottom: var(--space-md);
}

.footer__brand-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: var(--space-xs);
}

.footer__tagline {
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: var(--space-lg);
}

.footer h4 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-white);
    margin-bottom: var(--space-md);
}

.footer ul { list-style: none; padding: 0; }
.footer ul li { margin-bottom: var(--space-sm); }
.footer ul a {
    color: rgba(255,255,255,.6);
    font-size: 0.9rem;
    transition: color var(--trans);
}
.footer ul a:hover { color: var(--color-safran); }

.footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
    color: rgba(255,255,255,.6);
}

.footer__contact-item svg { margin-top: 3px; color: var(--color-safran); flex-shrink: 0; }

.footer__bottom {
    border-top: 1px solid var(--color-anthracite-3);
    padding-top: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    font-size: 0.82rem;
}

.footer__bottom-links {
    display: flex;
    gap: var(--space-lg);
}

.footer__bottom-links a {
    color: rgba(255,255,255,.45);
    font-size: 0.82rem;
    transition: color var(--trans);
}
.footer__bottom-links a:hover { color: var(--color-safran); }

/* ── Cookie banner ────────────────────────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 2000;
    background: var(--color-anthracite);
    border-top: 2px solid var(--color-safran);
    padding: var(--space-lg) var(--space-xl);
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
    box-shadow: 0 -4px 24px rgba(0,0,0,.2);
}

.cookie-banner.visible { display: flex; }

.cookie-banner__text {
    font-size: 0.9rem;
    color: rgba(255,255,255,.8);
    max-width: 700px;
}

.cookie-banner__text a { color: var(--color-safran); }

.cookie-banner__actions { display: flex; gap: var(--space-sm); flex-shrink: 0; }

/* ── Fermeture notice ─────────────────────────────────────────────────────── */
.fermeture-notice {
    background: #7A3B1E;
    color: var(--color-ivory);
    padding: var(--space-sm) var(--space-xl);
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
}

/* ── Formulaire ───────────────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--space-lg); }

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
    letter-spacing: 0.02em;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-white);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--trans), box-shadow var(--trans);
    outline: none;
    appearance: none;
}

.form-control:focus {
    border-color: var(--color-safran);
    box-shadow: 0 0 0 3px rgba(212,160,23,.15);
}

textarea.form-control { resize: vertical; min-height: 140px; }

.form-hint { font-size: 0.8rem; color: var(--color-text-light); margin-top: var(--space-xs); }

.form-alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    margin-bottom: var(--space-lg);
}

.form-alert--success { background: #EAF5EE; border-left: 4px solid var(--color-success); color: #2A5C38; }
.form-alert--error   { background: #FDECEC; border-left: 4px solid var(--color-error);   color: #7A2020; }

/* ── Hero générique ───────────────────────────────────────────────────────── */
.page-hero {
    background: var(--color-anthracite);
    padding: calc(70px + var(--space-2xl)) 0 var(--space-2xl);
    color: var(--color-ivory);
    position: relative;
    overflow: hidden;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 60px;
    background: var(--color-ivory);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.page-hero .section-eyebrow { color: var(--color-safran); }
.page-hero h1 { color: var(--color-white); margin-bottom: var(--space-md); }
.page-hero__sub {
    font-size: 1.1rem;
    color: rgba(255,255,255,.7);
    max-width: 600px;
}

/* ── Stats ────────────────────────────────────────────────────────────────── */
.stats-bar {
    background: var(--color-anthracite-2);
    padding: var(--space-xl) 0;
}

.stats-bar__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    text-align: center;
}

.stats-bar__item {}

.stats-bar__number {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--color-safran);
    line-height: 1;
    display: block;
}

.stats-bar__label {
    font-size: 0.85rem;
    color: rgba(255,255,255,.6);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: var(--space-xs);
    display: block;
}

/* ── Témoignage card ──────────────────────────────────────────────────────── */
.temo-card {
    background: var(--color-anthracite-2);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    position: relative;
}

.temo-card::before {
    content: '\201C';
    font-family: var(--font-display);
    font-size: 5rem;
    line-height: 1;
    color: var(--color-safran);
    opacity: .35;
    position: absolute;
    top: var(--space-md);
    left: var(--space-xl);
}

.temo-card__text {
    font-size: 0.95rem;
    color: rgba(255,255,255,.8);
    font-style: italic;
    line-height: 1.7;
    margin-bottom: var(--space-lg);
    padding-top: var(--space-xl);
}

.temo-card__author { font-weight: 700; color: var(--color-white); font-size: 0.9rem; }
.temo-card__etab   { font-size: 0.82rem; color: var(--color-safran); margin-top: 2px; }

/* ── Séparateur safran ────────────────────────────────────────────────────── */
.divider-safran {
    width: 48px;
    height: 3px;
    background: var(--color-safran);
    border-radius: 2px;
    margin: var(--space-md) 0;
}

.divider-safran--center { margin-left: auto; margin-right: auto; }

/* ── Badge ────────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.badge--safran { background: var(--color-safran); color: var(--color-anthracite); }
.badge--outline { border: 1px solid var(--color-safran); color: var(--color-safran); }

/* ── FAQ Accordion ────────────────────────────────────────────────────────── */
.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child { border-top: 1px solid var(--color-border); }

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: var(--space-lg) 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-anthracite);
    transition: color var(--trans);
}

.faq-question:hover { color: var(--color-safran); }
.faq-question.open  { color: var(--color-safran); }

.faq-question__icon {
    width: 28px; height: 28px;
    background: var(--color-safran-pale);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: var(--color-safran);
    transition: all var(--trans);
}

.faq-question.open .faq-question__icon {
    background: var(--color-safran);
    color: var(--color-anthracite);
    transform: rotate(45deg);
}

.faq-answer {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}

.faq-answer__inner {
    padding: 0 0 var(--space-lg);
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* ── Alerte fermeture (top) ────────────────────────────────────────────────── */
.top-notice {
    background: linear-gradient(90deg, #7A3B1E, #9A4B28);
    color: var(--color-ivory);
    text-align: center;
    padding: 10px var(--space-xl);
    font-size: 0.88rem;
    font-weight: 600;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .navbar__nav { display: none; }
    .navbar__burger { display: flex; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
    .stats-bar__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    :root { --space-3xl: 3.5rem; --space-2xl: 2.5rem; }
    .container, .container--narrow { padding: 0 var(--space-lg); }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; }
    .footer__bottom { flex-direction: column; text-align: center; }
    .stats-bar__grid { grid-template-columns: 1fr; gap: var(--space-lg); }
    .cookie-banner { flex-direction: column; align-items: flex-start; }
    .navbar__logo-text { display: none; }

    /* Menu mobile */
    .navbar__nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 70px; left: 0; right: 0; bottom: 0;
        background: var(--color-anthracite);
        padding: var(--space-xl);
        gap: 0;
        overflow-y: auto;
    }

    .navbar__nav.mobile-open a {
        padding: var(--space-md);
        font-size: 1.1rem;
        border-bottom: 1px solid var(--color-anthracite-3);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
