/* ============================================================
   SÉMIOLOGIE – Charte graphique du livre
   Mobile-first · Roboto · Turquoise / Jaune / Corail
   ============================================================ */

:root {
    --turquoise:      #49B6B2;
    --turquoise-dark: #1F8F8E;
    --turquoise-light:#d8f3f2;
    --yellow:         #FFD45A;
    --yellow-light:   #fff8e1;
    --coral:          #F07D6D;
    --coral-light:    #fde8e4;
    --white:          #FFFFFF;
    --bg:             #f1f4f8;
    --text:           #1A1A2E;
    --text-light:     #5a5f72;
    --border:         #dfe3ea;
    --radius:         12px;
    --radius-lg:      16px;
    --shadow:         0 4px 20px rgba(26,26,46,0.08);
    --shadow-lg:      0 8px 32px rgba(26,26,46,0.12);
    --transition:     0.2s ease;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Roboto', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, iframe { max-width: 100%; }
a { color: var(--turquoise-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4,h5 { margin: 0 0 .5em; line-height: 1.25; }
p { margin: 0 0 1em; }

/* --- Container --- */
.container { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
    background: var(--turquoise);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}

.nav-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
}

.nav-logo-img {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}

/* Hamburger (CSS-only) */
.nav-toggle-checkbox { display: none; }

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 110;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 20px 0;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--turquoise-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.nav-toggle-checkbox:checked ~ .nav-menu {
    transform: translateX(0);
}

.nav-toggle-checkbox:checked ~ .nav-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle-checkbox:checked ~ .nav-toggle span:nth-child(2) {
    opacity: 0;
}
.nav-toggle-checkbox:checked ~ .nav-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-menu li { width: 100%; }

.nav-menu a {
    display: block;
    padding: 16px 24px;
    color: var(--white);
    font-weight: 500;
    font-size: 16px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    transition: background var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255,255,255,0.12);
    text-decoration: none;
}

/* Desktop nav */
@media (min-width: 768px) {
    .nav-toggle { display: none; }

    .nav-menu {
        position: static;
        transform: none;
        flex-direction: row;
        background: transparent;
        padding: 0;
        gap: 4px;
    }

    .nav-menu li { width: auto; }

    .nav-menu a {
        padding: 8px 16px;
        border-radius: 999px;
        border-bottom: none;
        font-size: 14px;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: rgba(255,255,255,0.18);
    }
}

/* ============================================================
   HERO (page d'accueil)
   ============================================================ */
.hero {
    background: var(--turquoise);
    color: var(--white);
    padding: 40px 16px 48px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background: var(--yellow);
    border-radius: 50%;
    top: -60px;
    right: -40px;
    opacity: 0.25;
}

.hero::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    background: var(--coral);
    border-radius: 50%;
    bottom: -60px;
    left: -40px;
    opacity: 0.2;
}

.hero-badge {
    display: inline-block;
    background: var(--yellow);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.hero .hero-subtitle {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 8px;
}

.hero .hero-authors {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 15px;
    line-height: 1.6;
    max-width: 560px;
}

/* Hero 2 colonnes */
.hero-grid {
    position: relative;
    z-index: 1;
    max-width: 1040px;
    margin: 0 auto;
    display: grid;
    gap: 32px;
}

.hero-text-col { align-self: center; }

/* Hero connecté : plus compact */
.hero--home { padding: 24px 16px 28px; }
.hero--home h1 { font-size: 22px; }
.hero--home .hero-subtitle { font-size: 14px; margin-bottom: 4px; }
.hero--home .hero-desc { font-size: 13px; }
.hero--home .hero-badge { font-size: 11px; padding: 4px 10px; margin-bottom: 10px; }

@media (min-width: 768px) {
    .hero { padding: 48px 24px 56px; }
    .hero--home { padding: 28px 24px 32px; }
    .hero h1 { font-size: 36px; }
    .hero--home h1 { font-size: 26px; }
    .hero::before { width: 300px; height: 300px; top: -80px; right: -60px; }
    .hero-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
    .hero--gate .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
    .hero--home .hero-grid { gap: 24px; }
}

@media (min-width: 1024px) {
    .hero { padding: 56px 24px 64px; }
    .hero--home { padding: 32px 24px 36px; }
}

/* Couverture livre (image) */
.book-mockup {
    display: flex;
    justify-content: center;
}

.book-cover-img {
    width: 220px;
    height: auto;
    border-radius: 8px;
    box-shadow: 8px 8px 30px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.05);
    transform: perspective(600px) rotateY(-4deg);
    transition: transform 0.4s ease;
}

.book-cover-img:hover { transform: perspective(600px) rotateY(0deg); }

.book-mockup--small .book-cover-img { width: 140px; }

.hero-right-col { display: flex; flex-direction: column; gap: 20px; align-items: center; }
.hero-right-col--book-only { justify-content: center; }

/* Gate form dans le hero */
.gate-form-card {
    background: var(--white);
    color: var(--text);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 380px;
}

.gate-form-card h3 { font-size: 17px; color: var(--text); }
.gate-form-card p { font-size: 13px; color: var(--text-light); }

/* Section cards (accueil) */
.section-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border-top: 4px solid var(--turquoise);
}

.section-card--video { border-top-color: var(--coral); }
.section-card--lexique { border-top-color: var(--yellow); }

.section-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--turquoise-dark);
    background: var(--turquoise-light);
}

.section-card--video .section-card-icon { color: var(--coral); background: var(--coral-light); }
.section-card--lexique .section-card-icon { color: #b8860b; background: var(--yellow-light); }

.section-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-card p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

.section-card-arrow {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 20px;
    color: var(--border);
    transition: all 0.25s ease;
}

.home-section-link:hover .section-card {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.home-section-link:hover .section-card-arrow {
    color: var(--turquoise);
    transform: translateX(4px);
}

.home-sections {
    padding-bottom: 40px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 20px;
    flex-shrink: 0;
}

.card-icon--turquoise { background: var(--turquoise-light); }
.card-icon--yellow    { background: var(--yellow-light); }
.card-icon--coral     { background: var(--coral-light); }

.card h3 {
    font-size: 18px;
    font-weight: 700;
}

.card p {
    color: var(--text-light);
    font-size: 14px;
}

/* ============================================================
   FORMULAIRE EMAIL (gate)
   ============================================================ */
.auth-card {
    max-width: 480px;
    margin: 32px auto;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    background: var(--white);
    transition: border-color var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--turquoise);
    box-shadow: 0 0 0 3px rgba(73,182,178,0.15);
}

.hp-field { position: absolute; left: -9999px; opacity: 0; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), transform 0.1s;
    text-decoration: none;
}

.btn:active { transform: scale(0.98); }
.btn:hover { text-decoration: none; }

.btn--primary {
    background: var(--turquoise-dark);
    color: var(--white);
    width: 100%;
}

.btn--primary:hover { background: #17736f; }

.btn--outline {
    background: transparent;
    color: var(--turquoise-dark);
    border: 2px solid var(--turquoise);
}

.btn--outline:hover { background: var(--turquoise-light); }

.form-helper {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 10px;
}

.alert {
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 14px;
}

.alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ============================================================
   HOME SECTIONS GRID
   ============================================================ */
.home-sections {
    display: grid;
    gap: 16px;
    margin: 32px auto;
    max-width: 1040px;
    padding: 0 16px;
}

.home-section-link {
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition), box-shadow var(--transition);
}

.home-section-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

.home-section-link .card { margin-bottom: 0; }

@media (min-width: 768px) {
    .home-sections { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* ============================================================
   PAGE HEADER (sous-pages)
   ============================================================ */
.page-header {
    background: var(--turquoise);
    color: var(--white);
    padding: 28px 16px 32px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    background: var(--yellow);
    border-radius: 50%;
    top: -50px;
    right: -30px;
    opacity: 0.2;
}

.page-header h1 {
    position: relative;
    z-index: 1;
    font-size: 24px;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0;
}

.page-header p {
    position: relative;
    z-index: 1;
    max-width: 1040px;
    margin: 8px auto 0;
    opacity: 0.9;
    font-size: 14px;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--turquoise-light);
    color: var(--turquoise-dark);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 12px;
    font-weight: 700;
    margin: 28px 0 14px;
}

/* ============================================================
   CALCULATEURS
   ============================================================ */

/* Navigation rapide calculateurs */
.calc-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 56px;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.calc-nav-inner {
    display: flex;
    gap: 4px;
    padding: 10px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.calc-nav-inner::-webkit-scrollbar { display: none; }

.calc-nav-link {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--text-light);
    background: var(--bg);
    border: 1px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
}

.calc-nav-link:hover {
    color: var(--turquoise-dark);
    background: var(--turquoise-light);
    text-decoration: none;
}


/* Scroll offset pour les ancres (nav sticky) */
.calc-card[id],
.video-section-header[id] {
    scroll-margin-top: 120px;
}

.calc-grid {
    display: grid;
    gap: 20px;
    padding: 24px 16px 40px;
    max-width: 1040px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .calc-grid { grid-template-columns: repeat(2, 1fr); }
}

.calc-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.calc-card-header {
    padding: 16px 20px;
    background: var(--turquoise-light);
    border-bottom: 1px solid var(--border);
}

.calc-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--turquoise-dark);
    margin: 0;
}

.calc-card-header .calc-subtitle {
    font-size: 12px;
    color: var(--text-light);
    margin: 4px 0 0;
}

.calc-card-body {
    padding: 20px;
}

.calc-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.calc-field {
    flex: 1;
    min-width: 120px;
}

.calc-field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 4px;
}

.calc-field input,
.calc-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: var(--white);
    transition: border-color var(--transition);
}

.calc-field input:focus,
.calc-field select:focus {
    outline: none;
    border-color: var(--turquoise);
    box-shadow: 0 0 0 3px rgba(73,182,178,0.15);
}

/* Radio group (Glasgow, Sexe, etc.) */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.radio-group label {
    cursor: pointer;
    margin: 0;
}

.radio-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
}

.radio-btn {
    display: inline-block;
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
    text-align: center;
    min-width: 44px;
    user-select: none;
}

.radio-btn:hover {
    border-color: var(--turquoise);
    background: var(--turquoise-light);
}

input[type="radio"]:checked + .radio-btn {
    background: var(--turquoise);
    color: var(--white);
    border-color: var(--turquoise);
}

input[type="radio"]:focus-visible + .radio-btn {
    box-shadow: 0 0 0 3px rgba(73,182,178,0.3);
}

/* Résultat calculateur */
.calc-result {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
    display: none;
}

.calc-result.visible { display: block; }

.calc-result-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--turquoise-dark);
}

.calc-result-unit {
    font-size: 14px;
    color: var(--text-light);
    margin-left: 4px;
}

.calc-result-label {
    font-size: 13px;
    margin-top: 4px;
}

/* Badges interprétation */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge--green   { background: #dcfce7; color: #166534; }
.badge--yellow  { background: #fef9c3; color: #854d0e; }
.badge--orange  { background: #ffedd5; color: #9a3412; }
.badge--red     { background: #fef2f2; color: #991b1b; }
.badge--blue    { background: #dbeafe; color: #1e40af; }

/* Toggle unité (Cockcroft) */
.unit-toggle {
    display: inline-flex;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 12px;
}

.unit-toggle label {
    cursor: pointer;
    margin: 0;
}

.unit-toggle input { position: absolute; opacity: 0; }

.unit-toggle-btn {
    padding: 6px 12px;
    font-weight: 500;
    transition: all var(--transition);
}

.unit-toggle input:checked + .unit-toggle-btn {
    background: var(--turquoise);
    color: var(--white);
}

/* ============================================================
   GLASGOW – boutons détaillés
   ============================================================ */
.glasgow-group {
    margin-bottom: 18px;
}

.glasgow-group h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.glasgow-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.glasgow-option {
    cursor: pointer;
    margin: 0;
}

.glasgow-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.glasgow-option-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    transition: all var(--transition);
}

.glasgow-option-btn .score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg);
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.glasgow-option input:checked + .glasgow-option-btn {
    border-color: var(--turquoise);
    background: var(--turquoise-light);
}

.glasgow-option input:checked + .glasgow-option-btn .score {
    background: var(--turquoise);
    color: var(--white);
}

/* Glasgow total */
.glasgow-total {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    padding: 16px;
}

/* ============================================================
   APGAR TABLE
   ============================================================ */
.apgar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.apgar-table th,
.apgar-table td {
    padding: 10px 8px;
    border: 1px solid var(--border);
    text-align: center;
    vertical-align: middle;
}

.apgar-table th {
    background: var(--turquoise-light);
    color: var(--turquoise-dark);
    font-weight: 600;
    font-size: 12px;
}

.apgar-table td:first-child {
    text-align: left;
    font-weight: 500;
    background: #fafbfc;
    min-width: 100px;
}

.apgar-radio {
    cursor: pointer;
}

.apgar-total {
    font-weight: 700;
    font-size: 16px;
}

/* Table responsive (scroll horizontal) */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
}


/* ============================================================
   VIDÉOTHÈQUE
   ============================================================ */
.videos-grid {
    display: grid;
    gap: 20px;
    padding: 24px 16px 40px;
    max-width: 1040px;
    margin: 0 auto;
}

@media (min-width: 600px) {
    .videos-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
    .videos-grid { grid-template-columns: repeat(3, 1fr); }
}

.video-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.video-card iframe {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
    border: none;
}

.video-card-body {
    padding: 14px 16px 18px;
}

.video-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
}

.video-card .video-ref {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--turquoise-dark);
    background: var(--turquoise-light);
    border-radius: 6px;
    padding: 2px 8px;
    margin: 0 0 8px;
    letter-spacing: 0.01em;
}

.video-card .video-note {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.45;
}

.video-section-header {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ============================================================
   LEXIQUE – Style tableau (fidèle à la maquette du livre)
   ============================================================ */
.lexique-toolbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 20px 0 14px;
    position: sticky;
    top: 56px;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.search-box {
    position: relative;
    margin-bottom: 12px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-family: inherit;
    background: var(--bg);
    transition: border-color var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--turquoise);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(73,182,178,0.15);
}

.search-box::before {
    content: "\1F50D";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0.4;
}

.lexique-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 12px;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: var(--white);
    transition: all var(--transition);
    font-family: inherit;
    color: var(--text);
}

.filter-btn:hover { border-color: var(--turquoise); }

.filter-btn.active {
    background: var(--turquoise);
    color: var(--white);
    border-color: var(--turquoise);
}

.filter-btn--grec.active { background: #2563eb; border-color: #2563eb; }
.filter-btn--latin.active { background: var(--coral); border-color: var(--coral); }

.lexique-count {
    font-size: 13px;
    color: var(--text-light);
    white-space: nowrap;
}

/* Navigation alphabétique */
.alpha-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 10px;
}

.alpha-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: var(--white);
    color: var(--text);
    font-family: inherit;
    transition: all var(--transition);
}

.alpha-btn:hover:not(:disabled) { border-color: var(--turquoise); color: var(--turquoise-dark); }

.alpha-btn.active {
    background: var(--turquoise);
    color: var(--white);
    border-color: var(--turquoise);
}

.alpha-btn--disabled {
    opacity: 0.3;
    cursor: default;
}

/* Tableau lexique */
.lexique-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0 40px;
}

.lexique-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.lexique-table thead th {
    background: var(--turquoise);
    color: var(--white);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 14px;
    text-align: left;
    position: sticky;
    top: 0;
    white-space: nowrap;
}

.lexique-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: top;
}

.lexique-table .col-racine { font-weight: 600; color: var(--turquoise-dark); white-space: nowrap; min-width: 100px; }
.lexique-table .col-sens { min-width: 120px; }
.lexique-table .col-origine { white-space: nowrap; width: 70px; text-align: center; }
.lexique-table .col-exemple { min-width: 120px; font-style: italic; color: var(--text-light); }
.lexique-table .col-definition { min-width: 180px; color: var(--text-light); font-size: 12px; }

.lexique-table .row-even { background: var(--white); }
.lexique-table .row-odd { background: #fafbfc; }

.lexique-table tr:hover td { background: var(--turquoise-light); }

/* Header de lettre */
.letter-row td {
    background: var(--coral-light) !important;
    color: var(--coral);
    font-size: 16px;
    font-weight: 700;
    padding: 8px 14px;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--coral);
}

/* Badges origine dans le tableau */
.badge--grec {
    background: #dbeafe;
    color: #1e40af;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.badge--latin {
    background: var(--coral-light);
    color: #c0392b;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.lexique-empty {
    text-align: center;
    padding: 60px 16px;
    color: var(--text-light);
    font-size: 15px;
}

/* Mobile : masquer les colonnes moins critiques */
@media (max-width: 640px) {
    .lexique-table .col-definition { display: none; }
    .lexique-table thead .col-definition { display: none; }
    .lexique-table td { padding: 8px 10px; font-size: 12px; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    text-align: center;
    padding: 24px 16px 32px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

.footer-disclaimer {
    font-size: 12px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 8px;
    line-height: 1.5;
}

.footer-copy {
    font-size: 11px;
    color: var(--text-light);
    opacity: 0.7;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
