﻿/* =========================================================
   Pelican Training — Base UI
   ========================================================= */
:root {
    --red: #ff3131;
    --ink: #121a26; /* bleu nuit (accents/texte) */
    --bg: #fff;
    --muted: #6b7280;
    --wrap: 1120px; /* largeur max unique */
}

/* Reset */
* {
    box-sizing: border-box
}

html, body {
    margin: 0
}

img {
    max-width: 100%;
    height: auto;
    display: block
}

a {
    color: inherit;
    text-decoration: none
}

/* Typo */
body {
    background: var(--bg);
    color: var(--ink);
    font-family: Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
    font-size: 18px;
    line-height: 1.7;
}

h1 {
    font-size: clamp(2rem,1.6rem + 1.8vw,3rem);
    letter-spacing: -.01em;
    margin: 6px 0 12px;
    line-height: 1.1
}

h2 {
    font-size: clamp(1.5rem,1.2rem + .8vw,2rem);
    margin: 0 0 .25rem
}

h3 {
    font-size: clamp(1.125rem,1rem + .5vw,1.375rem);
    margin: 0 0 .35rem
}

ul {
    padding-left: 1.25em
}

li {
    margin-bottom: .35em
}

/* Conteneur */
.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 24px 16px
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.bar {
    max-width: var(--wrap);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0
}

    .logo img {
        width: clamp(160px,22vw,240px)
    }

.nav {
    margin-left: auto;
    display: flex;
    gap: 22px;
    align-items: center
}

    .nav a {
        font-size: 1rem;
        font-weight: 300;
        letter-spacing: .2px;
        white-space: nowrap;
        color: var(--red);
        padding: 8px 10px;
        border-bottom: 2px solid transparent;
        transition: border-color .15s ease,opacity .15s ease;
    }

        .nav a:hover {
            border-color: var(--red);
            opacity: .85
        }

.menu-btn {
    display: none
}

@media(max-width:860px) {
    .menu-btn {
        display: inline-flex;
        margin-left: auto;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 10px;
        padding: 8px 10px;
    }

    .nav {
        position: fixed;
        inset: 60px 0 auto 0;
        display: none;
        background: #fff;
        border-top: 1px solid #eee;
        flex-direction: column;
        gap: 0;
        padding: 8px 12px;
    }

        .nav a {
            padding: 14px 8px;
            width: 100%
        }

        .nav.open {
            display: flex
        }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
    max-width: var(--wrap);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: center;
    padding: 40px 16px 24px;
}

.eyebrow {
    color: var(--red);
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-size: .82rem;
    margin-bottom: 4px;
}

.lead {
    color: #374151;
    font-size: clamp(16px,2.1vw,18px)
}

.hero-logo img {
    width: 480px;
    max-width: 100%
}

.note {
    font-size: .9rem;
    color: var(--muted);
    margin-top: 4px
}

@media(max-width:860px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 20px
    }

    .hero-logo {
        order: -1
    }

        .hero-logo img {
            width: 90%
        }
}

/* Barre “prochaines dates” (home) */
.next-up {
    margin: 8px 0 24px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

    .next-up > strong {
        font-weight: 700
    }

    .next-up ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        gap: 8px;
        flex-wrap: wrap
    }

    .next-up li {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 10px;
        border: 1px solid #eee;
        border-radius: 999px;
        background: #fff;
    }

    .next-up .nu-where {
        color: #555;
        white-space: nowrap
    }

    .next-up .nu-when {
        color: #555;
        white-space: nowrap
    }

    .next-up .nu-dot {
        color: #bbb
    }

    .next-up .nu-cta {
        text-decoration: underline;
        white-space: nowrap
    }

    .next-up .nu-all {
        margin-left: auto
    }

@media(max-width:720px) {
    .next-up li {
        width: 100%;
        justify-content: space-between
    }

    .next-up .nu-all {
        width: 100%
    }
}

/* =========================================================
   Sections & cartes
   ========================================================= */
section {
    border-top: 1px solid #f1f2f4;
    background: #fff
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px
}

    .section-title .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--red)
    }

.kicker {
    color: var(--muted);
    font-size: .95rem;
    margin: 0 0 18px
}

/* Grilles */
.cards, .products {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    gap: 16px;
    align-items: stretch;
}

/* Carte générique */
.card {
    border: 1px solid #eee;
    border-radius: 14px;
    background: #fff;
    padding: clamp(20px,2.4vw,30px);
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

    /* Cartes “produit” = colonne : contenu en haut, CTA en bas */
    .card.product, .cards .card {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

        .card.product h3, .cards .card h3 {
            margin: 0 0 6px
        }

        .card.product p, .cards .card p {
            margin: 0 0 12px;
            color: #444
        }

        .card.product .cta-row, .cards .card .cta-row {
            margin-top: auto;
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
        }

.product.disabled {
    opacity: .6
}

.subtle {
    margin: 18px 0 10px;
    font-size: 1rem;
    font-weight: 500;
    opacity: .8
}

@media(max-width:980px) {
    .cards {
        grid-template-columns: repeat(2,1fr)
    }
}

@media(max-width:640px) {
    .cards {
        grid-template-columns: 1fr
    }

    .card {
        padding: 18px
    }
}

/* =========================================================
   Boutons
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    font-weight: 700;
    line-height: 1.1;
    border: 1px solid var(--red);
    white-space: nowrap;
}

.btn-primary {
    background: var(--red);
    color: #fff
}

.btn-ghost {
    background: #fff;
    color: var(--red)
}

.btn.btn--link {
    background: transparent;
    border: none;
    padding: 0;
    text-decoration: underline
}

.btn.btn--secondary {
    border: 1px solid #ddd;
    background: #fff;
    color: inherit;
    padding: .55rem .85rem
}

.cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--red);
    color: #fff;
    padding: .6rem .9rem;
    border-radius: 12px
}

/* =========================================================
   Badges unifiés
   ========================================================= */
.badge {
    display: inline-block;
    line-height: 1;
    font-size: .85rem;
    padding: .35rem .6rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
}

    .badge.soon {
        border-color: var(--red);
        color: var(--red);
        background: #fff
    }

.badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 6px 0 0
}

.badge--open {
    background: #ffecec;
    color: #b30000;
    border-color: #ff3131
}

.badge--full {
    background: #eee;
    color: #666
}

.badge--cancel {
    background: #222;
    color: #fff;
    border-color: #222
}

/* =========================================================
   Sessions (dates)
   ========================================================= */
.sessions {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    gap: 16px;
    margin: 12px 0 4px;
}

.session {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
    border: 1px solid #eee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.session__title {
    margin: 0 0 6px;
    font-size: 1.05rem
}

.session__sub {
    margin: 0 0 8px;
    color: #555
}

.session__actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap
}

/* “Prochaines dates” — cartes/home (unique déf.) */
.next-dates {
    list-style: none;
    margin: 8px 0 12px;
    padding: 0
}

    .next-dates li {
        display: flex;
        gap: 8px;
        align-items: center;
        font-size: .92rem
    }

    .next-dates .nd-date {
        white-space: nowrap
    }

    .next-dates .nd-place {
        color: #555;
        white-space: nowrap
    }

    .next-dates .nd-sep {
        color: #bbb
    }

    .next-dates .nd-cta {
        text-decoration: underline
    }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
    border-top: 1px solid #eee;
    background: #fff
}

.foot {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 24px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

    .foot small {
        color: var(--muted)
    }

    .foot .mini {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--red);
        font-weight: 500
    }
/* Réduire d'au moins 50% la taille des illustrations de fiches */
.course-illust img {
    width: clamp(100px, 13vw, 180px); /* avant: clamp(200px, 26vw, 360px) */
    height: auto;
}
/* =======================
   Sections repliables
   ======================= */
.fold .wrap {
    padding-top: 0;
}

/* Titre cliquable (on garde le look actuel) */
.fold-trigger {
    display: block;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 0;
    padding: 24px 16px 8px;
    cursor: pointer;
    position: relative;
}

    .fold-trigger:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 2px;
    }

    /* Petite flèche */
    .fold-trigger::after {
        content: "▾";
        position: absolute;
        right: 16px;
        top: 28px;
        transition: transform .2s ease;
        color: #999;
    }

.fold.is-open .fold-trigger::after {
    transform: rotate(-180deg);
}

/* Contenu pliable */
.fold-panel {
    display: none;
    padding: 0 16px 24px;
}

.fold.is-open .fold-panel {
    display: block;
}
/* ===========================
   Onglets (tabs) – look & feel
   =========================== */

.tabs {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin: 10px 0 18px;
    padding: 6px;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 14px;
}

/* Boutons d’onglet */
[role="tab"] {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    background: transparent;
    padding: 10px 14px;
    border-radius: 10px;
    font: inherit;
    font-weight: 600;
    color: #374151; /* gris lisible */
    cursor: pointer;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
    outline: none; /* on gère le focus nous-mêmes */
    line-height: 1.2;
}

    /* Survol (onglet inactif) */
    [role="tab"]:hover {
        background: #f7f8fa;
    }

    /* Focus accessible */
    [role="tab"]:focus-visible {
        box-shadow: 0 0 0 2px rgba(255,49,49,.25);
    }

    /* Onglet actif */
    [role="tab"][aria-selected="true"] {
        background: var(--red);
        color: #fff;
        box-shadow: 0 6px 16px rgba(255,49,49,.18);
    }

/* Réduction d’animation pour préférences OS */
@media (prefers-reduced-motion: reduce) {
    [role="tab"] {
        transition: none;
    }
}

/* Mobile : bandeau défilable, sans scrollbar visuelle */
@media (max-width: 720px) {
    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        gap: 6px;
    }

        .tabs::-webkit-scrollbar {
            display: none;
        }
    /* WebKit */
    [role="tab"] {
        flex: 0 0 auto;
    }
    /* pas de wrap des chips */
}
/* Retour tactiel*/
[role="tab"][aria-selected="true"]:active {
    transform: translateY(1px);
}
