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

:root {
    --navy:    #0f172a;
    --navy-2:  #1e293b;
    --slate:   #475569;
    --muted:   #94a3b8;
    --border:  #e2e8f0;
    --bg:      #f8fafc;
    --white:   #ffffff;
    --red:     #e11d48;
    --red-light: #fff1f2;
    --blue:    #2563eb;
    --blue-light: #eff6ff;
    --green:   #059669;
    --radius:  12px;
    --shadow:  0 1px 3px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06);
    --shadow-hover: 0 4px 8px rgba(0,0,0,.08), 0 16px 40px rgba(0,0,0,.12);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--navy-2);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header ── */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo {
    width: 58px;
    height: 58px;
    border-radius: 12px;
}

.brand-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -.4px;
    line-height: 1;
}

.brand-tld {
    display: inline-block;
    background: var(--red);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 5px;
    margin-left: 2px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.header-nav {
    display: flex;
    gap: 4px;
}

.header-nav a {
    color: var(--slate);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    transition: color .15s, background .15s;
}

.header-nav a:hover {
    color: var(--navy);
    background: var(--bg);
}

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, #1e1b4b 100%);
    color: var(--white);
    padding: 20px 0 16px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(225,29,72,.15), transparent);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(225,29,72,.15);
    border: 1px solid rgba(225,29,72,.3);
    color: #fda4af;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 100px;
    margin-top: 6px;
    margin-bottom: 12px;
}

.hero-title {
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

.hero-title .accent {
    color: var(--red);
    background: linear-gradient(135deg, #e11d48, #f43f5e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 400;
    color: #94a3b8;
    max-width: 620px;
    line-height: 1.7;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--white);
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

/* ── Sections ── */
.actors-section {
    padding: 40px 0 24px;
}

.actors-section + .actors-section {
    border-top: 1px solid var(--border);
    padding-top: 32px;
}

.section-header {
    margin-bottom: 20px;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--slate);
    margin-bottom: 0;
}

.cat-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.cat-fact { background: var(--red-light); color: var(--red); }
.cat-inst { background: var(--blue-light); color: var(--blue); }
.cat-emi  { background: #f0fdf4; color: var(--green); }
.cat-acad { background: #fdf4ff; color: #9333ea; }
.cat-gami { background: #fff7ed; color: #ea580c; }

.section-title {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.5px;
    color: var(--navy);
}

/* ── Cards ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.card--fact-checkers:hover  { border-top: 3px solid var(--red); }
.card--emi:hover            { border-top: 3px solid var(--green); }
.card--institutionnels:hover{ border-top: 3px solid var(--blue); }
.card--academique:hover     { border-top: 3px solid #9333ea; }
.card--gamification:hover   { border-top: 3px solid #ea580c; }

.card-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.card-avatar {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
}

.card-avatar img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.card--fact-checkers .card-avatar {
    background: var(--red-light);
    color: var(--red);
}

.card--emi .card-avatar {
    background: #f0fdf4;
    color: var(--green);
}

.card--academique .card-avatar {
    background: #fdf4ff;
    color: #9333ea;
}

.card--gamification .card-avatar {
    background: #fff7ed;
    color: #ea580c;
}

.card--institutionnels .card-avatar {
    background: var(--blue-light);
    color: var(--blue);
}

.card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -.2px;
    line-height: 1.3;
}

.card-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--muted);
}

.card-desc {
    font-size: 14px;
    color: var(--slate);
    line-height: 1.65;
    flex: 1;
}

.card-footer {
    margin-top: 4px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--red);
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 8px;
    background: var(--red-light);
    transition: background .15s, color .15s;
}

.card--emi .card-link {
    color: var(--green);
    background: #f0fdf4;
}

.card--academique .card-link {
    color: #9333ea;
    background: #fdf4ff;
}

.card--gamification .card-link {
    color: #ea580c;
    background: #fff7ed;
}

.card--institutionnels .card-link {
    color: var(--blue);
    background: var(--blue-light);
}

.card-link:hover {
    background: var(--red);
    color: var(--white);
}

.card--emi .card-link:hover        { background: var(--green); color: var(--white); }
.card--academique .card-link:hover  { background: #9333ea; color: var(--white); }
.card--gamification .card-link:hover{ background: #ea580c; color: var(--white); }

.card--institutionnels .card-link:hover {
    background: var(--blue);
    color: var(--white);
}

.card-link--disabled {
    color: var(--muted);
    background: var(--bg);
    cursor: default;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 8px;
    display: inline-flex;
}

/* ── Footer ── */
.site-footer {
    background: var(--navy);
    color: var(--muted);
    padding: 32px 0;
    font-size: 14px;
    margin-top: 40px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.footer-link {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s;
}

.footer-link:hover { color: var(--white); }

/* ── API page ── */
.api-page { padding: 40px 0 60px; }

.api-header {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.api-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -.5px;
}

.api-subtitle {
    font-size: 14px;
    color: var(--slate);
}

.api-spec-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--red);
    text-decoration: none;
    background: var(--red-light);
    padding: 3px 10px;
    border-radius: 6px;
    margin-left: 8px;
}

.api-spec-link:hover { background: var(--red); color: var(--white); }

#swagger-ui { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Mentions légales ── */
.legal {
    padding: 56px 0 80px;
}

.legal-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.5px;
    color: var(--navy);
    margin-bottom: 40px;
}

.legal-section {
    margin-bottom: 32px;
}

.legal-section h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.legal-section p {
    font-size: 15px;
    color: var(--slate);
    line-height: 1.7;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--red);
    text-decoration: none;
    margin-top: 16px;
}

.back-link:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .hero { padding: 64px 0 56px; }
    .hero-stats { gap: 28px; }
    .header-nav { display: none; }
    .cards-grid { grid-template-columns: 1fr; }
}
