/* ─── Fonts ─── */
@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('media/fonts/nunito-regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('media/fonts/nunito-semibold.ttf') format('truetype');
}

@font-face {
    font-family: 'Baloo 2';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('media/fonts/baloo2-600.ttf') format('truetype');
}

/* Inter 500/700 — UNIQUEMENT pour la barre de produits, qui doit rendre à l'identique
   sur les trois façades Ibou. Le corps de ces pages reste en Nunito. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('media/fonts/inter-500.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('media/fonts/inter-700.ttf') format('truetype');
}

/* ─── Variables ─── */
:root {
    --text-primary: #1a1a1a;
    --accent: #EC3AA7;
    --accent-dark: #be185d;
    --heading: #4f8ecb;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0 0 80px;
    font-family: 'Nunito', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background: linear-gradient(180deg, #FCE1E4 0%, #E0F7FA 50%, #E8F5E9 100%);
}

/* ─── Page card ─── */
.page {
    max-width: 880px;
    margin: 0 auto 0;
    padding: 48px clamp(24px, 5vw, 72px) 64px;
    border-radius: 48px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    box-shadow: 0 30px 60px rgba(20, 74, 104, 0.15);
}

/* ─── Headings ─── */
h1 {
    margin: 0;
    font-family: 'HK Grotesk', 'Baloo 2', cursive;
    font-size: clamp(48px, 6vw, 72px);
    letter-spacing: 1px;
    text-align: center;
    color: var(--heading);
}

.tagline {
    margin: 32px 0 48px;
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: center;
}

.tagline strong { font-weight: 600; }

h2 {
    margin: 56px 0 32px;
    font-family: 'HK Grotesk', 'Baloo 2', cursive;
    font-size: clamp(32px, 4vw, 48px);
    color: var(--heading);
    text-align: center;
    letter-spacing: 1px;
}

section { margin-bottom: 48px; }

.section-title {
    display: inline-block;
    margin-bottom: 20px;
    font-family: 'Baloo 2', cursive;
    font-size: clamp(22px, 3vw, 28px);
    color: var(--accent-dark);
    letter-spacing: 0.5px;
}

p {
    margin: 0 0 16px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.emphasis { font-weight: 600; }

/* ─── Closing ─── */
.closing {
    margin-top: 64px;
    padding: 32px clamp(16px, 4vw, 48px);
    border-radius: 32px;
    background: rgba(79, 142, 203, 0.08);
}

.closing p { font-size: 1.1rem; }

.pledges {
    margin: 40px 0 48px;
    font-family: 'Baloo 2', cursive;
    font-size: clamp(22px, 3vw, 26px);
    color: var(--accent-dark);
    line-height: 1.8;
    text-align: center;
}

/* ─── Social links ─── */
.socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
    font-family: 'Nunito', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    margin-top: 32px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(79, 142, 203, 0.2);
    color: var(--heading);
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.social-link:hover,
.social-link:focus-visible {
    border-color: rgba(236, 58, 167, 0.6);
    box-shadow: 0 10px 24px rgba(79, 142, 203, 0.18);
    transform: translateY(-2px);
}

.social-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.social-label {
    color: inherit;
    white-space: nowrap;
}

/* ─── HEADER ─── */
/* Design de référence : le header d'Ibou News (ibou-news-front : Header.svelte +
   VerticalNav.svelte). Les trois façades — ibou.io, Explorer, Actualités — doivent rester
   pixel pour pixel identiques : toute retouche ici se répercute là-bas, et inversement.
   Sticky + flou à toutes les largeurs, 0.75rem de respiration verticale → 64px de haut. */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: transparent;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.header-container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    /* Sur News et Explorer, ce sont les pastilles de droite (40px) qui tiennent la barre à
       64px, y compris sous 720px où le logo tombe à 34px. Ici il n'y a rien à droite : sans
       ce plancher la barre se tasserait à 58px sur mobile et ne collerait plus aux deux
       autres façades. */
    min-height: 64px;
}

/* ─── VERTICAL NAV ─── */
.vertical-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-width: 0;
}

.vertical-nav-logo {
    display: inline-flex;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.vertical-nav-logo:hover { transform: scale(1.03); }
.vertical-nav-logo:active { transform: scale(0.98); }

.vertical-nav-logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.vertical-nav-tabs {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.vertical-nav-tabs::-webkit-scrollbar { display: none; }

.vertical-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 6px 10px;
    border: none;
    background: none;
    text-decoration: none;
    /* Valeurs en dur, pas de token ni d'héritage : ce bloc doit rendre à l'identique
       quelle que soit la feuille qui l'héberge. style-pages.css ne définit ni
       --text-tertiary ni --ibou-pink, et met le corps de page en Nunito — la barre
       virait alors au #1a1a1a en Nunito au lieu du slate-500 en Inter. */
    color: #64748b;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s ease;
    /* Jamais compressés : la bande d'onglets porte overflow-x:auto, c'est ELLE qui
       défile quand la place manque. Sans ça les onglets rétrécissent sous leur taille
       de dessin (31px) et passent sous le plancher de 24px de WCAG 2.2 AA. */
    flex-shrink: 0;
    /* Explicite : News hérite d'un line-height normal, ce site non — sans cette ligne
       l'onglet serait plus haut et le soulignement descendrait de 2-3px. */
    line-height: normal;
}

/* Soulignement animé, pas de fond au survol. */
.vertical-tab::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transform: scaleX(0);
    transition: transform 0.15s ease;
}

.vertical-tab:hover { color: #0f172a; }
.vertical-tab:hover::after,
.vertical-tab.active::after { transform: scaleX(1); }

.vertical-tab.active {
    color: #EC3AA7;
    font-weight: 700;
    font-size: 14px;
}

/* 15px fixes, et non em : la taille ne doit pas bouger entre onglet actif (14px)
   et onglet inactif (13px). */
.nav-icon {
    width: 15px;
    height: 15px;
    fill: currentColor;
    flex-shrink: 0;
}

/* ─── Language switcher ─── */
.lang-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
}

.lang-links { display: flex; gap: 8px; }

.lang-link {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--heading);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(79, 142, 203, 0.2);
    transition: border-color 0.2s, transform 0.2s;
}

.lang-link:hover { border-color: var(--accent); transform: translateY(-1px); }

.lang-link.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    cursor: default;
}

/* ─── Lien mentions légales ─── */
.legal-line {
    margin-top: 40px;
    text-align: center;
    font-size: .9rem;
}

.legal-line a {
    color: var(--heading);
    text-decoration: underline;
}

.legal-line a:hover { color: var(--accent-dark); }

/* ─── Pied de page ─── */
.site-footer {
    margin: 32px auto 0;
    text-align: center;
    font-size: .85rem;
    color: rgba(26, 26, 26, .6);
}

.site-footer a {
    color: var(--heading);
    text-decoration: underline;
}

.site-footer a:hover { color: var(--accent-dark); }

/* ─── Focus visible (accessibilité) ─── */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ─── Mouvements réduits (accessibilité) ─── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ─── TOAST ─── */
.ibou-toast[hidden] { display: none; }

.ibou-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    background: #fff;
    color: #1a1a1a;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .15);
    border: 1px solid rgba(226, 232, 240, .8);
    border-left: 3px solid #EC3AA7;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Nunito', 'Helvetica Neue', Arial, sans-serif;
    min-width: 280px;
    max-width: 420px;
}

.ibou-toast-in { animation: toastIn .25s ease both; }
.ibou-toast-out { animation: toastOut .25s ease both; }

@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(-50%) translateY(0); } to { opacity: 0; transform: translateX(-50%) translateY(20px); } }

/* ─── VERTICAL NAV : sous 720px, libellés masqués, les icônes restent (règle News) ─── */
@media (max-width: 720px) {
    /* Masqués VISUELLEMENT seulement. En display:none, les cinq liens n'auraient plus
       aucun nom accessible — l'icône est aria-hidden — et un lecteur d'écran annoncerait
       cinq « lien » vides (échec WCAG 2.4.4 et 4.1.2, niveau A). Sorti du flux, le libellé
       laisse à l'onglet exactement sa géométrie d'icône seule : 31x31. */
    .vertical-tab-label {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border-width: 0;
    }
    .vertical-nav { gap: 0.75rem; }
    .vertical-tab { padding: 8px; }
    .vertical-tab::after { left: 8px; right: 8px; }
    .vertical-nav-logo-img { height: 34px; }
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
    body { padding: 0 0 56px; }
    .page { padding: 32px 20px; border-radius: 32px; margin: 0 12px; }
    .tagline { text-align: left; }
}
