@font-face{font-family:"Twemoji Country Flags";unicode-range:U+1F1E6-1F1FF,U+1F3F4,U+E0062-E0063,U+E0065,U+E0067,U+E006C,U+E006E,U+E0073-E0074,U+E0077,U+E007F;src:url("../fonts/TwemojiCountryFlags.woff2") format("woff2");font-display:swap}

:root{
  --ink:#10234f;
  --ink2:#4c5d7b;
  --paper:#ffffff;
  --bg:#f7faff;
  --line:#e2e8f3;
  --blue:#2c7df3;
  --blue-soft:#eaf3ff;
  --orange:#ff7a24;
  --orange-soft:#fff1e6;
  --green:#18a05e;
  --green-soft:#e7f7ee;
  --purple:#7b58db;
  --purple-soft:#f0eaff;
  --pink:#ef5ea8;
  --pink-soft:#ffe8f4;
  --yellow:#f8b933;
  --shadow:0 16px 40px rgba(26,48,89,.10);
  --radius:28px;
}
*{box-sizing:border-box}
body.manga-page{
  margin:0;
  font-family:"Twemoji Country Flags","Trebuchet MS","Segoe UI",Arial,sans-serif;
  color:var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(255,184,82,.08) 0 90px, transparent 92px),
    radial-gradient(circle at 92% 22%, rgba(71,122,255,.08) 0 120px, transparent 122px),
    var(--bg);
}
a{text-decoration:none;color:inherit}
img{display:block;max-width:100%}
.mg-header{
  position:sticky;top:0;z-index:60;
  background:rgba(255,255,255,.95);
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(16,35,79,.08)
}
.mg-header .inner{
  max-width:1480px;margin:auto;padding:12px 22px;
  display:grid;grid-template-columns:auto 1fr auto;gap:22px;align-items:center
}
.brand{
  display:flex;align-items:center;gap:10px;font-size:22px;font-weight:1000
}
.brand .badge{
  width:42px;height:42px;border-radius:15px;background:linear-gradient(145deg,#2f8cff,#165ad8);
  color:#fff;display:grid;place-items:center;box-shadow:0 8px 18px rgba(40,125,242,.25)
}
.topnav{display:flex;justify-content:center;gap:4px;flex-wrap:wrap}
.topnav a{
  padding:10px 13px;border-radius:13px;font-weight:900;color:#41506f
}
.topnav a.active,.topnav a:hover{background:#eef4ff;color:#1769d7}
.header-actions{display:flex;align-items:center;gap:10px}
.search{position:relative;min-width:260px}
.search input{
  width:100%;padding:11px 40px 11px 16px;border-radius:999px;border:1px solid #d9e2f0;background:#fff;
  outline:none;color:var(--ink)
}
.search button{
  position:absolute;right:5px;top:5px;border:0;border-radius:50%;width:32px;height:32px;background:#12274f;color:#fff
}
.mini-btn{
  padding:10px 13px;border-radius:13px;border:1px solid #d9e2f0;background:#fff;color:#1e56ae;font-weight:1000
}
.page{max-width:1480px;margin:auto;padding:24px 22px 56px}
.panel{
  background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)
}
.section-title{margin:0 0 10px;font-size:44px;letter-spacing:-2px}
.section-sub{margin:0;color:#5f6d85;font-size:18px;line-height:1.5}
.tag{
  display:inline-flex;align-items:center;gap:8px;padding:9px 15px;border-radius:999px;
  background:#eef0ff;color:#4048b8;font-weight:1000;font-size:14px
}
.page-head{
  padding:28px 30px;margin-bottom:22px;
  background:linear-gradient(135deg,#ffffff 0%,#ffffff 70%,#edf5ff 100%);
  position:relative;overflow:hidden
}
.page-head:after{
  content:"";position:absolute;right:-30px;top:-20px;width:180px;height:180px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,122,36,.12),transparent 66%);
}
.grid-subjects{
  display:grid;grid-template-columns:repeat(6,1fr);gap:16px
}
.subject-card{
  background:#fff;border:1px solid var(--line);border-radius:24px;overflow:hidden;
  box-shadow:0 10px 26px rgba(28,45,78,.07);transition:.18s
}
.subject-card:hover{transform:translateY(-4px);box-shadow:0 18px 36px rgba(28,45,78,.12)}
.subject-card img{width:100%;height:138px;object-fit:cover}
.subject-card .body{padding:12px 14px 16px}
.subject-card h3{margin:0 0 7px;font-size:22px;letter-spacing:-.6px}
.subject-card p{margin:0;color:#66748c;line-height:1.4;font-size:14px}
.quick-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.quick-card{
  padding:18px;border-radius:23px;border:1px solid var(--line);background:#fff;box-shadow:0 10px 26px rgba(28,45,78,.07)
}
.quick-card h3{margin:0 0 8px;font-size:22px}
.quick-card p{margin:0;color:#66748c;line-height:1.45}
.quick-card .btn{
  margin-top:14px;display:inline-flex;padding:10px 14px;border-radius:14px;font-weight:1000
}
.btn-blue{background:#eaf3ff;color:#1769d7}
.btn-green{background:#e8f7ee;color:#14874f}
.btn-orange{background:#fff1e6;color:#a8520a}
.btn-purple{background:#f0eaff;color:#6e41c5}

.list-table{
  width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid var(--line);
  border-radius:24px;overflow:hidden;box-shadow:0 10px 26px rgba(28,45,78,.07)
}
.list-table th,.list-table td{padding:15px 16px;text-align:left;border-bottom:1px solid var(--line)}
.list-table th{background:#f7faff;font-size:14px;color:#607089}
.list-table tr:last-child td{border-bottom:0}

.lesson-shell{
  display:grid;grid-template-columns:1.15fr .85fr;gap:18px
}
.lesson-panel,.side-panel{
  background:#fff;border:1px solid var(--line);border-radius:26px;box-shadow:0 12px 30px rgba(28,45,78,.08)
}
.lesson-panel{padding:22px}
.side-panel{padding:20px}
.lesson-hero{
  display:grid;grid-template-columns:.95fr 1.05fr;align-items:center;gap:14px;overflow:hidden;border-radius:24px;
  background:linear-gradient(135deg,#fff7fb 0%, #fffdf6 100%);border:1px solid #f0e5ef;padding:14px;margin-bottom:18px
}
.lesson-hero img{width:100%;height:100%;object-fit:cover;border-radius:18px}
.lesson-hero h2{margin:0 0 10px;font-size:34px;letter-spacing:-1px}
.lesson-hero p{margin:0;color:#5e6d86;line-height:1.45}
.strip{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.strip span{padding:8px 11px;border-radius:999px;font-weight:900;font-size:13px}
.strip span:nth-child(1){background:#eaf3ff;color:#1769d7}
.strip span:nth-child(2){background:#e8f7ee;color:#14874f}
.strip span:nth-child(3){background:#fff1e6;color:#a8520a}
.strip span:nth-child(4){background:#f0eaff;color:#6e41c5}
.media-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.media-card,.tool-card{
  border:1px solid var(--line);border-radius:22px;padding:14px;background:#fff
}
.media-card h3,.tool-card h3{margin:0 0 10px;font-size:22px}
.media-card .thumb{height:220px;border-radius:18px;overflow:hidden;background:#eef3fb}
.media-card .thumb img{width:100%;height:100%;object-fit:cover}
.exercise-box{
  border:1px solid var(--line);border-radius:20px;padding:16px;background:#fbfefb
}
.exercise-answers{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.exercise-answers button{
  border:1px solid #d7e3d7;background:#fff;padding:10px 14px;border-radius:12px;font-weight:1000;color:#174f29
}
.side-tools{display:grid;gap:12px}
.side-tools a{
  display:flex;justify-content:space-between;align-items:center;padding:16px;border-radius:18px;font-weight:1000
}
.side-tools a:nth-child(1){background:#fff0f4;color:#d33f7d}
.side-tools a:nth-child(2){background:#f0eaff;color:#6f42c7}
.side-tools a:nth-child(3){background:#e8f8ef;color:#14874f}
.side-tools a:nth-child(4){background:#fff4df;color:#c87900}
.side-tools a:nth-child(5){background:#eaf3ff;color:#1769d7}
.msg-layout{display:grid;grid-template-columns:320px 1fr;gap:16px}
.threads,.chat{background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:0 10px 26px rgba(28,45,78,.07)}
.thread{padding:14px 16px;border-bottom:1px solid var(--line)}
.thread:last-child{border-bottom:0}
.thread strong{display:block}
.thread span{color:#66748c;font-size:14px}
.chat-body{height:420px;overflow:auto;padding:18px}
.bubble{max-width:72%;padding:12px 14px;border-radius:16px;margin:10px 0;background:#f4f7fd}
.bubble.me{margin-left:auto;background:#eaf3ff}
.chat-input{display:flex;gap:10px;padding:14px;border-top:1px solid var(--line)}
.chat-input input{flex:1;border:1px solid #d9e2f0;border-radius:14px;padding:12px}
.chat-input button{border:0;border-radius:14px;background:#1769d7;color:#fff;padding:12px 16px;font-weight:1000}
.footer-note{margin-top:28px;color:#5b6883;text-align:center}
@media(max-width:1200px){
  .grid-subjects{grid-template-columns:repeat(4,1fr)}
  .quick-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:980px){
  .mg-header .inner{grid-template-columns:1fr auto}
  .topnav{display:none}
  .header-actions{grid-column:1/-1}
  .lesson-shell,.lesson-hero,.msg-layout{grid-template-columns:1fr}
}
@media(max-width:700px){
  .page{padding:16px 12px 40px}
  .grid-subjects{grid-template-columns:repeat(2,1fr)}
  .quick-grid{grid-template-columns:1fr}
  .section-title{font-size:34px}
  .page-head{padding:22px 18px}
  .search{min-width:0}
  .header-actions{display:grid;grid-template-columns:1fr 1fr}.search{grid-column:1/-1}
}


/* --- V2.2 : matières en style manga plus marqué --- */
.grid-subjects{gap:18px !important}
.subject-card{
  border:2px solid #e6ebf4 !important;
  box-shadow:0 12px 28px rgba(28,45,78,.08) !important;
}
.subject-card img{
  height:165px !important;
  background:linear-gradient(135deg,#edf5ff,#fff4ea);
}
.subject-card .body{padding:14px 14px 16px !important}
.subject-card h3{font-size:21px !important;margin-bottom:4px !important}
.subject-card p{font-size:13px !important;color:#64738c !important}
.subject-card::before{
  content:"";
  position:absolute;
  right:15px; top:16px;
  width:34px;height:10px;border-radius:999px;
  background:rgba(255,255,255,.74);
  box-shadow:0 15px 0 rgba(255,255,255,.54);
}
.subject-card:nth-child(6n+1) img{background:linear-gradient(135deg,#eef4ff,#eaf7ff)}
.subject-card:nth-child(6n+2) img{background:linear-gradient(135deg,#edf8ff,#eef8f2)}
.subject-card:nth-child(6n+3) img{background:linear-gradient(135deg,#fff6e8,#fff1e6)}
.subject-card:nth-child(6n+4) img{background:linear-gradient(135deg,#ecfbff,#eef5ff)}
.subject-card:nth-child(6n+5) img{background:linear-gradient(135deg,#f8f0ff,#fff2f8)}
.subject-card:nth-child(6n+6) img{background:linear-gradient(135deg,#eefdf2,#edf9ff)}


/* V2.3 - matières manga HD et pages de chapitres */
.subject-card{position:relative}
.subject-card img{
  height:175px !important;
  object-fit:cover !important;
  object-position:center !important;
}
.subject-card .body{background:#fff}
.subject-card .body h3{color:var(--ink)}
.subject-card .body p{min-height:38px}

.subject-hero{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:22px;
  align-items:center;
  padding:28px;
  margin-bottom:22px;
  overflow:hidden;
  position:relative;
  background:linear-gradient(135deg,#fff 0%,#fff 60%,#edf5ff 100%);
}
.subject-hero-copy{position:relative;z-index:2}
.subject-hero-image{
  height:310px;border-radius:24px;overflow:hidden;border:1px solid var(--line);
  box-shadow:0 14px 32px rgba(28,45,78,.12);
}
.subject-hero-image img{width:100%;height:100%;object-fit:cover}
.subject-hero h1{margin:12px 0 8px;font-size:48px;letter-spacing:-2px}
.subject-hero p{font-size:18px;color:#5f6d85;line-height:1.5;margin:0}
.breadcrumb{display:flex;gap:8px;flex-wrap:wrap;font-size:14px;font-weight:900;color:#55709d}
.breadcrumb a{color:#1769d7}
.chapter-grid{
  display:grid;grid-template-columns:repeat(2,1fr);gap:18px
}
.chapter-card{
  background:#fff;border:1px solid var(--line);border-radius:25px;padding:20px;
  box-shadow:0 10px 28px rgba(28,45,78,.07)
}
.chapter-card h2{margin:0 0 14px;font-size:25px;letter-spacing:-.8px}
.lesson-list{display:grid;gap:9px}
.lesson-link{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px 14px;border-radius:15px;background:#f7faff;border:1px solid #e8edf5;
  font-weight:800;color:#344968;transition:.17s
}
.lesson-link:hover{background:#eaf3ff;color:#1769d7;transform:translateX(3px)}
.lesson-link.ready{background:#e8f8ef;color:#117c49;border-color:#d2efdf}
.lesson-link small{
  font-weight:800;color:#7b879b;white-space:nowrap
}
.subject-nav{
  display:flex;gap:10px;flex-wrap:wrap;margin:0 0 20px
}
.subject-nav a{
  padding:9px 12px;border-radius:999px;background:#fff;border:1px solid var(--line);
  font-size:13px;font-weight:900;color:#51617d
}
.subject-nav a:hover{background:#eaf3ff;color:#1769d7}
@media(max-width:900px){
  .subject-hero{grid-template-columns:1fr}
  .subject-hero-image{height:260px}
  .chapter-grid{grid-template-columns:1fr}
}


/* ===================== V2.7 fix cartes matières internes ===================== */
.grid-subjects{
  align-items:stretch !important;
}
.subject-card{
  display:flex !important;
  flex-direction:column !important;
  min-width:0 !important;
  overflow:hidden !important;
  isolation:isolate;
  contain:layout paint;
}
.subject-thumb{
  display:block;
  position:relative;
  width:100%;
  height:175px;
  overflow:hidden;
  border-bottom:1px solid #e8edf5;
  background:linear-gradient(135deg,#edf5ff,#fff4ea);
  flex:0 0 auto;
}
.subject-thumb img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  object-fit:cover !important;
  object-position:center center !important;
  transform:scale(1.01);
}
.subject-card > img{
  display:block !important;
  width:100% !important;
  height:175px !important;
  max-width:none !important;
  object-fit:cover !important;
  object-position:center center !important;
}
.subject-card .body{
  position:relative;
  z-index:3;
  background:#fff;
  flex:1 1 auto;
}
.subject-card h3{
  line-height:1.12;
}
.subject-card p{
  overflow-wrap:anywhere;
}

/* V3.9 — verrouillage du cadrage des visuels matières */
.subject-card img,
.subject-hero-image img,
.subjects-grid img,
.subject-grid img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}
.subject-card,.subject-hero-image,.subjects-grid>* ,.subject-grid>* {overflow:hidden}

/* V4.1 — une discipline = une vraie image séparée */
.subject-card,
.subject-card .subject-img,
.subjects-grid > *,
.subject-grid > *{
  overflow:hidden !important;
}
.subject-card img,
.subject-card .subject-img img,
.subjects-grid img,
.subject-grid img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  object-position:center !important;
}

/* Comptes / liens légaux */
.legal-links{display:inline-block;margin-top:8px;font-size:14px}
.legal-links a{color:#1769d7;font-weight:800}
.legal-links a:hover{text-decoration:underline}
@media(max-width:760px){.parent-cta{grid-template-columns:1fr !important}.parent-cta>div:last-child{min-width:0 !important}}

/* ===== V7.0 — en-tête commun, menu mobile, pied de page, accessibilité ===== */
.skip-link{position:absolute;left:-9999px;top:8px;z-index:200;background:#10234f;color:#fff;padding:10px 14px;border-radius:12px;font-weight:900}
.skip-link:focus{left:12px}
.nav-toggle{display:none;align-items:center;gap:8px;justify-self:end;min-height:44px;padding:8px 14px;border-radius:13px;border:1px solid #d9e2f0;background:#fff;color:#10234f;font:inherit;font-weight:1000;cursor:pointer}
.nav-toggle-bars,.nav-toggle-bars::before,.nav-toggle-bars::after{display:block;width:20px;height:3px;border-radius:3px;background:currentColor;transition:transform .2s}
.nav-toggle-bars{position:relative}
.nav-toggle-bars::before,.nav-toggle-bars::after{content:"";position:absolute;left:0}
.nav-toggle-bars::before{top:-6px}.nav-toggle-bars::after{top:6px}
.nav-open .nav-toggle-bars{background:transparent}
.nav-open .nav-toggle-bars::before{transform:translateY(6px) rotate(45deg)}
.nav-open .nav-toggle-bars::after{transform:translateY(-6px) rotate(-45deg)}
.mg-header .brand{min-width:0}
.mg-header .brand span:last-child{white-space:nowrap}
.mg-header.nav-long .inner{grid-template-columns:auto 1fr;row-gap:6px}
.mg-header.nav-long .header-actions{justify-self:end;flex-wrap:wrap;justify-content:flex-end}
.mg-header.nav-long .topnav{grid-column:1/-1;grid-row:2;justify-content:flex-start;border-top:1px solid #edf1f8;padding-top:6px}
.mg-header.nav-long .topnav a{padding:8px 12px}
.topnav a[aria-current="page"],.topnav a.active{background:#eef4ff;color:#1769d7}
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid #1769d7;outline-offset:2px}
.site-footer{margin-top:30px;border-top:1px solid #e2e8f3;background:#fff}
.site-footer .sf-inner{max-width:1480px;margin:auto;padding:22px;display:flex;flex-wrap:wrap;gap:10px 24px;align-items:center;justify-content:space-between;color:#5b6883;font-size:15px}
.site-footer p{margin:0}
.site-footer nav{display:flex;flex-wrap:wrap;gap:6px 16px}
.site-footer a{color:#1769d7;font-weight:800}
.site-footer a:hover{text-decoration:underline}
.footer-note{color:#62708a}
@media(max-width:980px){
  .mg-header .inner,.mg-header.nav-long .inner{grid-template-columns:1fr auto;gap:10px 12px;padding:10px 14px}
  .nav-toggle{display:inline-flex}
  .mg-header .topnav,.mg-header.nav-long .topnav{display:none;grid-column:1/-1;grid-row:auto;flex-direction:column;align-items:stretch;gap:2px;border-top:1px solid #e8edf6;padding-top:8px;max-height:70vh;overflow:auto}
  .mg-header.nav-open .topnav{display:flex}
  .mg-header .topnav a{padding:12px 14px;font-size:17px}
  .mg-header .header-actions{grid-column:1/-1;flex-wrap:wrap}
  .mg-header .header-actions:empty{display:none}
}
@media(max-width:700px){
  .mg-header .header-actions{display:flex;flex-wrap:wrap;gap:8px}
  .mg-header .header-actions .search{flex:1 1 100%}
  .mg-header .header-actions .mini-btn{flex:1 1 auto;text-align:center}
  .site-footer .sf-inner{flex-direction:column;align-items:flex-start;padding:18px 16px}
}
@media print{.mg-header,.site-footer,.nav-toggle{display:none!important}}
:where(img[width][height]){height:auto}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.lesson-search{margin-top:18px;max-width:620px}
.lesson-search label{display:block;font-weight:1000;margin-bottom:6px;color:#10234f}
.lesson-search input{width:100%;min-height:50px;padding:12px 18px;border-radius:999px;border:2px solid #d4def0;background:#fff;font:inherit;font-size:17px;color:#10234f}
.lesson-search input:focus{border-color:#1769d7;outline:none;box-shadow:0 0 0 4px rgba(23,105,215,.18)}
.search-results{margin:18px 0;background:#fff;border:1px solid var(--line);border-radius:24px;padding:18px 20px;box-shadow:var(--shadow)}
.search-results h2{margin:0 0 12px;font-size:22px}
.search-results p{margin:8px 0 0;color:#5f6d85}
.sr-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:10px}
.sr-list a{display:flex;flex-direction:column;gap:3px;padding:12px 14px;border-radius:16px;background:#f5f8ff;border:1px solid #e3ebf8;color:#10234f}
.sr-list a:hover{background:#eaf1ff}
.sr-list small{color:#5b6b8c;font-weight:700}
@media(max-width:560px){.mg-header .brand-sub{display:none}}
/* V7.0 — contrastes (WCAG AA) */
.mathrow small{color:#56647d!important}.mstat{color:#0f7a45!important}

/* Lien discret vers la connexion administrateur */
.site-footer .sf-maint{font-size:11px;font-weight:400;color:#a3adbf;margin-left:auto}
.site-footer .sf-maint:hover{color:#5b6883}
.topnav [hidden]{display:none!important}
/* ---- Lot A (v75) : confort tactile mobile / tablette (liens du pied de page, bouton compte, installation) */
.site-footer nav a,.site-footer .sf-install{display:inline-flex;align-items:center;min-height:40px}
.site-footer .sf-maint{display:inline-flex;align-items:center;min-height:40px;font-size:13px;color:#7d889c}
.site-footer .sf-install{border:1px solid #cfe0fb;background:#eaf3ff;color:#0f4fa8;border-radius:12px;padding:6px 12px;font:inherit;font-weight:900;cursor:pointer;gap:6px}
.site-footer .sf-install[hidden]{display:none}
@media (max-width:980px),(pointer:coarse){
  .cap6e-acct{min-height:42px}
}
@media (max-width:980px),(pointer:coarse){
  .site-footer nav a{min-width:40px;justify-content:center}
  .subject-card p{font-size:14px !important}
}
/* Logo France Collège (assets/img/logo/france-college-icone.svg) à la place du « FC » ; un collège personnalisé garde ses couleurs. */
.brand .badge{background-image:url("../img/logo/france-college-icone.svg");background-size:100% 100%;background-color:transparent;color:transparent;font-size:0;box-shadow:0 6px 14px rgba(20,80,184,.22)}
