:root {
    --primary: #00415D;
    --secondary: #FF414D;
    --ink: #15232d;
    --muted: #647887;
    --line: #d8e4ea;
    --soft: #f4f8fb;
    --paper: #ffffff;
    --success: #12805c;
    --danger: #c93445;
    --shadow: 0 18px 50px rgba(0, 45, 64, .10);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    background: #f7fafc;
    font-family: Montserrat, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
textarea { min-height: 118px; resize: vertical; }

.react-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(18px, 5vw, 72px);
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(216, 228, 234, .8);
    backdrop-filter: blur(18px);
}
.react-nav nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-weight: 700; color: #35505f; }
.react-brand, .brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0;
}
.react-brand span, .brand span {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #fff;
    background: var(--primary);
    border-radius: 8px;
}
.brand.compact { color: #fff; margin-bottom: 28px; }
.brand.compact span { background: var(--secondary); }

.react-btn, .btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}
.react-btn.primary, .btn.primary { color: #fff; background: var(--primary); }
.react-btn.secondary, .btn.secondary { color: #fff; background: var(--secondary); }
.react-btn.ghost, .btn.ghost { color: var(--primary); background: #fff; border-color: var(--line); }
.btn.danger { color: #fff; background: var(--danger); }
.btn.small { min-height: 32px; padding: 0 10px; font-size: .82rem; }

.react-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
    gap: clamp(24px, 5vw, 70px);
    align-items: center;
    min-height: 78vh;
    padding: clamp(56px, 8vw, 110px) clamp(18px, 5vw, 72px) clamp(44px, 6vw, 72px);
    background:
        linear-gradient(120deg, rgba(0, 65, 93, .98), rgba(0, 65, 93, .82) 52%, rgba(255, 65, 77, .16)),
        url('../img/hero-learning.svg') center/cover no-repeat;
    color: #fff;
}
.react-kicker, .eyebrow {
    margin: 0 0 10px;
    color: var(--secondary);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.react-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(3.5rem, 9vw, 8rem);
    line-height: .9;
    letter-spacing: 0;
}
.hero-lead { max-width: 740px; font-size: clamp(1.05rem, 2vw, 1.28rem); line-height: 1.75; color: #e6f2f6; }
.hero-actions, .topbar-actions, .actions, .inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero-board {
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 14px;
    background: rgba(255,255,255,.12);
    box-shadow: 0 30px 90px rgba(0,0,0,.24);
    backdrop-filter: blur(18px);
    overflow: hidden;
}
.board-header { display: flex; gap: 8px; padding: 16px; border-bottom: 1px solid rgba(255,255,255,.18); }
.board-header span { width: 12px; height: 12px; border-radius: 50%; background: #fff; opacity: .7; }
.board-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(255,255,255,.16); }
.board-grid article { min-height: 172px; padding: 22px; background: rgba(0,65,93,.42); }
.board-grid strong { display: block; margin: 12px 0 6px; font-size: 1.02rem; }
.board-grid p { margin: 0; color: #d6edf5; line-height: 1.55; }
.react-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--secondary); color: #fff; font-weight: 800; }

.react-section { padding: clamp(46px, 7vw, 92px) clamp(18px, 5vw, 72px); }
.method-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    padding-top: 0;
    background: var(--primary);
}
.method-strip article { padding: 26px; background: #fff; border-bottom: 1px solid var(--line); }
.method-strip span { color: var(--secondary); font-weight: 800; }
.method-strip strong { display: block; margin: 8px 0; color: var(--primary); }
.method-strip p { color: var(--muted); line-height: 1.65; }
.react-section-head {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: end;
    margin-bottom: 24px;
}
.react-section-head.compact { margin-bottom: 14px; }
.react-section h2, .panel h2 { margin: 0 0 14px; color: var(--primary); font-size: clamp(1.6rem, 3vw, 2.6rem); letter-spacing: 0; }
.react-filters, .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    align-items: end;
}
.form-grid.wide { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
label { display: grid; gap: 7px; color: var(--muted); font-size: .9rem; font-weight: 700; }
.full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    color: var(--ink);
    background: #fff;
}
.react-course-grid, .cards, .stats-grid, .proof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}
.react-course-card, .course-card, .panel, .stat, .contact-box, .auth-card, .install-card, .certificate-card, .proof-grid article {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
}
.react-course-card { overflow: hidden; }
.course-media, .course-cover { min-height: 190px; background: var(--primary) center/cover no-repeat; }
.course-body, .course-card > div:last-child { padding: 20px; }
.react-badge, .badge {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--primary);
    background: #e7f1f5;
    font-size: .78rem;
    font-weight: 800;
}
.badge.danger { color: var(--danger); background: #ffe7ea; }
.course-meta, .meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: .86rem; }
.react-empty, .empty { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.proof-zone { background: #fff; }
.proof-grid article { padding: 20px; box-shadow: none; }
.proof-grid strong { color: var(--primary); }
.proof-grid p { color: var(--muted); line-height: 1.6; }
.trainer-zone {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    gap: 24px;
    align-items: center;
    background: var(--soft);
}
.trainer-zone aside { padding: 24px; border-radius: 10px; color: #fff; background: var(--primary); }
.faq-zone details { margin: 12px 0; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.faq-zone summary { cursor: pointer; font-weight: 800; color: var(--primary); }
.react-footer, .site-footer { display: flex; gap: 20px; flex-wrap: wrap; padding: 24px clamp(18px, 5vw, 72px); color: #fff; background: #071c27; }

.auth-page, .install-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--soft); }
.auth-card, .install-card { width: min(100%, 540px); padding: 24px; }
.flash, .notice { margin: 14px; padding: 12px 14px; border-radius: 8px; background: #edf7f2; color: var(--success); }
.notice.danger, .flash.danger { background: #ffe7ea; color: var(--danger); }

.app-shell { display: grid; grid-template-columns: 282px 1fr; min-height: 100vh; }
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px;
    color: #d9edf5;
    background: linear-gradient(180deg, #00374f, #082331);
    overflow-y: auto;
}
.sidebar nav { display: grid; gap: 7px; }
.sidebar nav a { padding: 11px 12px; border-radius: 8px; font-weight: 800; }
.sidebar nav a:hover { color: #fff; background: rgba(255,255,255,.1); }
.app-main { min-width: 0; padding: 26px; }
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.topbar h1 { margin: 0; color: var(--primary); letter-spacing: 0; }
.stat { padding: 20px; }
.stat strong { display: block; margin-top: 8px; color: var(--primary); font-size: 2rem; }
.stat.accent { border-color: var(--secondary); }
.panel { padding: 20px; margin-bottom: 18px; overflow-x: auto; }
table { width: 100%; min-width: 680px; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--primary); font-size: .86rem; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.alert-list, .lesson-list { display: grid; gap: 10px; }
.lesson-list a, .progress-row, .notice-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}
.progress { height: 10px; margin: 14px 0; background: #e2ebf0; border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--secondary); }
.video-box { aspect-ratio: 16/9; border-radius: 10px; background: #061923; overflow: hidden; }
.video-box iframe { width: 100%; height: 100%; border: 0; }
.content { line-height: 1.8; }
.certificate-card { min-height: 260px; padding: 24px; border: 3px solid var(--primary); }

.ai-studio {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.ai-agent-list {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 10px;
}
.agent-card {
    width: 100%;
    padding: 16px;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 45, 64, .06);
}
.agent-card.active { border-color: var(--secondary); box-shadow: 0 18px 40px rgba(255, 65, 77, .16); }
.agent-card strong { display: block; color: var(--primary); }
.agent-card span { display: inline-block; margin: 6px 0; color: var(--secondary); font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.agent-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.ai-panel { margin-bottom: 18px; }
.ai-result { grid-column: 2; }
.ai-result textarea { min-height: 360px; font-family: Consolas, monospace; }
.inline-create-agent { margin-top: 14px; }

@media (max-width: 980px) {
    .react-hero, .trainer-zone, .app-shell, .grid-2, .ai-studio { grid-template-columns: 1fr; }
    .method-strip { grid-template-columns: repeat(2, 1fr); }
    .sidebar { position: static; height: auto; }
    .sidebar nav { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
    .ai-agent-list { position: static; }
    .ai-result { grid-column: auto; }
}
@media (max-width: 680px) {
    .react-nav, .topbar, .react-section-head { align-items: flex-start; flex-direction: column; }
    .board-grid, .method-strip { grid-template-columns: 1fr; }
    .app-main { padding: 18px; }
    .react-hero h1 { font-size: 3.4rem; }
}
@media print {
    .sidebar, .topbar, .btn, .react-btn, .react-nav { display: none !important; }
    .app-shell { display: block; }
    .app-main { padding: 0; }
    .certificate-card { box-shadow: none; page-break-inside: avoid; }
}

/* Nouvelle landing simple et lisible */
.landing-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px clamp(18px, 4vw, 56px);
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--line);
}
.landing-nav nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-weight: 700; color: #385363; }
.landing-page { background: #f7fafc; }
.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, .75fr);
    gap: 34px;
    align-items: center;
    padding: clamp(44px, 7vw, 86px) clamp(18px, 5vw, 64px);
    background: linear-gradient(135deg, #f8fbfd 0%, #eaf3f7 100%);
}
.hero-text h1 {
    max-width: 760px;
    margin: 0 0 16px;
    color: var(--primary);
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    line-height: 1.02;
}
.hero-text p { max-width: 700px; color: #4d6574; line-height: 1.75; font-size: 1.02rem; }
.hero-panel {
    padding: 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.mini-dashboard { display: grid; gap: 12px; }
.mini-dashboard div {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 4px 12px;
    padding: 16px;
    border-radius: 10px;
    background: var(--soft);
}
.mini-dashboard span {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: var(--primary);
    border-radius: 8px;
    font-weight: 800;
}
.mini-dashboard strong { color: var(--primary); }
.mini-dashboard small { color: var(--muted); line-height: 1.5; }
.landing-band {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    padding: 22px clamp(18px, 5vw, 64px);
    background: #fff;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.landing-band article {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
.landing-band .icon, .title-icon, .stat-icon {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #fff;
    background: var(--primary);
    border-radius: 8px;
    font-weight: 800;
}
.landing-band strong { color: var(--primary); }
.landing-band p { margin: 0; color: var(--muted); line-height: 1.55; }
.landing-section { padding: clamp(42px, 6vw, 76px) clamp(18px, 5vw, 64px); }
.section-title-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    margin-bottom: 22px;
}
.section-title-row h2, .landing-section h2 {
    margin: 0;
    color: var(--primary);
    font-size: clamp(1.45rem, 3vw, 2.35rem);
    line-height: 1.16;
}
.clean-filters {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) auto;
    gap: 10px;
}
.course-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.training-card {
    display: grid;
    grid-template-columns: 118px 1fr;
    min-height: 160px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(0, 45, 64, .07);
}
.training-thumb { background: var(--primary) center/cover no-repeat; }
.training-content { padding: 16px; }
.training-content h3 { margin: 10px 0 8px; color: var(--primary); font-size: 1.05rem; line-height: 1.35; }
.training-content p { margin: 0 0 12px; color: var(--muted); line-height: 1.58; font-size: .92rem; }
.two-columns {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(280px, 1fr);
    gap: 28px;
    background: #fff;
}
.section-copy { color: var(--muted); line-height: 1.7; }
.check-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.check-list span {
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
    color: #2f4b5c;
    font-weight: 700;
}
.faq-simple details { margin: 10px 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.faq-simple summary { color: var(--primary); font-weight: 800; cursor: pointer; }
.landing-footer {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 22px clamp(18px, 5vw, 64px);
    background: #092331;
    color: #fff;
}

/* Dashboard professionnel */
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.pro-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 96px;
}
.pro-stat .stat-icon { flex: 0 0 36px; background: #e8f1f5; color: var(--primary); }
.pro-stat strong { margin: 2px 0 0; font-size: 1.55rem; line-height: 1; }
.pro-stat span:not(.stat-icon) { color: var(--muted); font-size: .88rem; font-weight: 700; }
.panel h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 1.22rem;
    line-height: 1.25;
}
.title-icon {
    width: 30px;
    height: 30px;
    font-size: .86rem;
    background: var(--secondary);
}
.soft-panel { box-shadow: none; background: var(--soft); }
.ai-main-column { display: grid; gap: 18px; }
.ai-studio.no-react { align-items: start; }
.agent-card small {
    display: inline-block;
    margin-top: 8px;
    color: var(--primary);
    font-weight: 800;
}

@media (max-width: 900px) {
    .landing-hero, .two-columns, .dashboard-grid { grid-template-columns: 1fr; }
    .landing-band { grid-template-columns: repeat(2, 1fr); }
    .section-title-row { align-items: flex-start; flex-direction: column; }
    .clean-filters { grid-template-columns: 1fr; width: 100%; }
}
@media (max-width: 640px) {
    .landing-nav { align-items: flex-start; flex-direction: column; }
    .landing-band, .check-list, .training-card { grid-template-columns: 1fr; }
    .training-thumb { min-height: 140px; }
}

/* Page de connexion */
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(380px, .75fr);
    background: #f7fafc;
}
.login-visual {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(28px, 5vw, 64px);
    color: #fff;
    background:
        linear-gradient(135deg, rgba(0, 65, 93, .98), rgba(0, 65, 93, .78)),
        url('../img/hero-learning.svg') center/cover no-repeat;
}
.login-brand { color: #fff; }
.login-brand span { background: var(--secondary); }
.login-visual h1 {
    max-width: 680px;
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 1.08;
}
.login-visual p:not(.eyebrow) {
    max-width: 620px;
    color: #d9edf5;
    line-height: 1.75;
}
.login-panel {
    display: grid;
    place-items: center;
    padding: clamp(22px, 4vw, 48px);
}
.login-card {
    width: min(100%, 430px);
    display: grid;
    gap: 18px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
}
.login-heading h2 {
    margin: 0 0 6px;
    color: var(--primary);
    font-size: 1.65rem;
}
.login-heading span { color: var(--muted); }
.login-actions {
    display: grid;
    gap: 14px;
    margin-top: 6px;
}
.login-actions .btn {
    width: 100%;
    min-height: 48px;
}
.login-actions a {
    justify-self: center;
    color: var(--primary);
    font-weight: 700;
}

@media (max-width: 860px) {
    .login-page { grid-template-columns: 1fr; }
    .login-visual { min-height: 320px; }
}

/* Dashboard refait : clair, aéré, professionnel */
.app-shell {
    grid-template-columns: 260px minmax(0, 1fr);
    background: #f5f8fa;
}
.sidebar {
    padding: 20px 16px;
    background: #ffffff;
    color: var(--ink);
    border-right: 1px solid var(--line);
    box-shadow: none;
}
.brand.compact {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    color: var(--primary);
}
.brand.compact span {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--primary);
    font-size: .82rem;
}
.brand.compact strong { font-size: 1rem; }
.sidebar-label {
    margin: 8px 8px 10px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.app-nav {
    display: grid;
    gap: 4px;
}
.app-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #314b5b;
    font-size: .88rem;
    font-weight: 700;
}
.app-nav a:hover {
    color: var(--primary);
    background: #edf5f8;
}
.nav-icon,
.metric-icon,
.panel-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: var(--primary);
    background: #e8f1f5;
    font-size: .9rem;
}
.sidebar .app-nav a:hover,
.sidebar .app-nav a:focus {
    color: var(--primary);
    background: #edf5f8;
}
.sidebar .app-nav a:hover span,
.sidebar .app-nav a:focus span {
    color: var(--primary);
}
.sidebar .app-nav a:hover .nav-icon,
.sidebar .app-nav a:focus .nav-icon {
    color: #fff;
    background: var(--primary);
}
.app-main {
    padding: 22px;
}
.topbar {
    margin: 0 0 18px;
    padding: 0 0 16px;
}
.topbar h1 {
    font-size: 1.55rem;
    line-height: 1.2;
}
.topbar .eyebrow {
    margin-bottom: 5px;
    font-size: .68rem;
}
.user-chip {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
}
.dashboard-welcome {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
.dashboard-welcome h2 {
    max-width: 720px;
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 1.28rem;
    line-height: 1.35;
}
.dashboard-welcome p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    font-size: .92rem;
}
.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.clean-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.metric-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 86px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
}
.metric-icon {
    width: 38px;
    height: 38px;
    background: #edf5f8;
}
.metric-card strong {
    display: block;
    margin-bottom: 3px;
    color: var(--primary);
    font-size: 1.45rem;
    line-height: 1;
}
.metric-card span:not(.metric-icon) {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
}
.dashboard-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}
.dashboard-columns.compact {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
}
.content-panel {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
}
.panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.panel-title h2 {
    margin: 0 0 3px;
    color: var(--primary);
    font-size: 1.04rem;
    line-height: 1.25;
}
.panel-title p {
    margin: 0;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.4;
}
.simple-list {
    display: grid;
    gap: 8px;
}
.list-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e8eef2;
    border-radius: 8px;
    background: #fbfdfe;
}
.list-row strong {
    display: block;
    margin-bottom: 3px;
    color: var(--ink);
    font-size: .92rem;
}
.list-row span,
.list-row small,
.empty-line {
    color: var(--muted);
    font-size: .82rem;
}
.progress-summary strong {
    display: block;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 2rem;
    line-height: 1;
}
.clean-alerts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.clean-alerts .badge {
    min-height: 30px;
    border-radius: 8px;
}

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .app-nav { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
    .dashboard-welcome,
    .topbar { align-items: flex-start; flex-direction: column; }
    .dashboard-columns,
    .dashboard-columns.compact { grid-template-columns: 1fr; }
}

/* Module IA pédagogique avancé */
.ai-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
.ai-header h2 {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 1.35rem;
}
.ai-header p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}
.ai-status {
    min-width: 180px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--soft);
}
.ai-status span {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 800;
}
.ai-status span.ok { color: #0f684b; background: #dff6ec; }
.ai-status span.off { color: #8b2d38; background: #ffe7ea; }
.ai-status strong {
    display: block;
    color: var(--primary);
    font-size: 1.35rem;
}
.ai-status small { color: var(--muted); }
.ai-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.ai-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #365464;
    font-size: .86rem;
    font-weight: 800;
}
.ai-tab.active,
.ai-tab:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}
.content-panel textarea {
    width: 100%;
}
