/*
Theme Name: Boreja
Theme URI: https://boreja.fr
Author: Boreja Académie Numérique
Description: Thème bloc sur mesure de Boreja Académie Numérique — préparation aux EVC. Tout le contenu se modifie dans l'éditeur de blocs.
Version: 1.0.2
Requires at least: 6.6
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: boreja
Tags: block-theme, full-site-editing, education
*/

:root {
  --blue: #1877F2;
  --blue-hover: #166FE5;
  --blue-deep: #0B4FB3;
  --blue-soft: #E7F0FE;
  --blue-softer: #F3F7FE;
  --ink: #1C1E21;
  --muted: #65676B;
  --faint: #8A8D91;
  --line: #E4E6EB;
  --grey: #F0F2F5;
  --white: #FFFFFF;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 24px rgba(16, 24, 40, .05);
  --sidebar: 292px;
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, ::before, ::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p { margin: 0; }
figure { margin: 0; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }

/* Les icônes sont des masques CSS : chaque classe ic-* (icons.css) fournit
   --i (trait noir, pour un masque teinté par currentColor), --b (trait bleu,
   pour un fond) et --t (trait fin). Aucun SVG dans le contenu. */
.nav-menu .wp-block-navigation-item__content::before,
.help__line::before,
.topbar__menu::before,
.topbar__crumb::before,
.search .wp-block-search__inside-wrapper::before,
.wp-block-button[class*=" ic-"] .wp-block-button__link::before,
.wp-block-button[class*=" ia-"] .wp-block-button__link::after,
.card__link a::after,
.linkbox::before,
.linkbox::after,
.path::after,
.cta-bar::after,
.resume::after,
.tab::before,
.list__item::before,
.list__item--go::after,
.player-badge::before,
.crumbs em::before,
.crumbs strong::before,
.chapters > li::after,
.courses > li::after,
.session .annale::before {
  content: "";
  flex: none;
  width: 20px; height: 20px;
  background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
}
.wp-block-button[class*=" ia-"] .wp-block-button__link::after,
.card__link a::after,
.linkbox::after,
.path::after,
.cta-bar::after,
.resume::after,
.list__item--go::after,
.chapters > li::after,
.courses > li::after {
  -webkit-mask-image: var(--j);
  mask-image: var(--j);
}
.card__link a, .linkbox, .path, .cta-bar, .resume { --j: var(--i-arrow); }
.resume, .list__item--go, .chapters > li, .courses > li { --j: var(--i-chev); }
.crumbs { --i: var(--i-chev); }
.player-badge { --i: var(--i-check); }

/* Lien étendu : toute la carte devient cliquable, le lien reste un texte éditable. */
.linkbox a::after, .path h3 a::after, .cta-bar a::after, .resume a::after,
.video h3 a::after, .list__item a::after, .book h3 a::after,
.chapters > li a::after, .courses > li a::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
}

/* Puce d'icône : fond bleu pâle + icône bleue */
.has-chip::before {
  content: "";
  flex: none;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--b) center / 24px 24px no-repeat, var(--blue-soft);
}

/* ---------- Structure ---------- */

.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--white);
}
.sidebar .sidebar__logo { display: flex; align-items: center; justify-content: center; flex: none; height: 88px; padding: 0 28px; margin: 0; border-bottom: 1px solid var(--line); }
.sidebar .sidebar__logo a { display: block; }
.sidebar .sidebar__logo img { height: 60px; width: auto; mix-blend-mode: multiply; }
.sidebar__nav { flex: 1; overflow-y: auto; padding: 18px 14px; }
.nav-label { margin: 18px 14px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }

.sidebar .nav-menu { display: block; font-size: 15.5px; }
.sidebar .nav-menu .wp-block-navigation__container { display: flex; flex-direction: column; align-items: stretch; gap: 0; width: 100%; margin: 0; padding: 0; }
.sidebar .nav-menu .wp-block-navigation-item { display: block; width: 100%; }
.sidebar .nav-menu .wp-block-navigation-item__content {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 14px; margin-bottom: 2px;
  border-radius: 12px; font-size: 15.5px; font-weight: 500; line-height: 1.55; color: var(--ink);
  transition: background .15s;
}
.sidebar .nav-menu .wp-block-navigation-item__content::before { background: var(--muted); }
.sidebar .nav-menu .wp-block-navigation-item__content:hover { background: var(--grey); }
.sidebar .nav-menu .current-menu-item > .wp-block-navigation-item__content { background: var(--blue); color: var(--white); font-weight: 600; box-shadow: 0 6px 16px rgba(24, 119, 242, .28); }
.sidebar .nav-menu .current-menu-item > .wp-block-navigation-item__content::before { background: var(--white); }
.sidebar .nav-sep { height: 1px; margin: 14px 8px 0; border: 0; background: var(--line); opacity: 1; }

.help { margin: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.help__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.help__head p { font-size: 16px; font-weight: 700; }
.help__head::after { content: ""; width: 42px; height: 42px; border-radius: 12px; background: var(--w-chat) center / 20px 20px no-repeat, var(--blue); }
.help__line { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; color: var(--muted); }
.help__line::before { width: 17px; height: 17px; background: var(--blue); }
.help__line a:hover { color: var(--blue); }
.sidebar__foot { padding: 14px 24px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); line-height: 1.45; }

.main { min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  height: 88px; padding: 0 40px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .topbar__menu { display: none; padding: 8px; margin-left: -8px; font-size: 0; line-height: 0; cursor: pointer; }
.topbar .topbar__logo { display: none; margin: 0; }
.topbar .topbar__crumb { display: flex; align-items: center; gap: 14px; margin: 0; font-size: 17px; font-weight: 400; line-height: 1.55; color: var(--muted); }
.topbar__crumb::before { width: 22px; height: 22px; }
.topbar__right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.topbar .search { margin: 0; }
.topbar .search .wp-block-search__inside-wrapper {
  display: flex; align-items: center; gap: 10px;
  width: 260px; height: 46px; padding: 0 12px 0 16px;
  border: 0; border-radius: 99px; background: var(--grey); color: var(--faint); font-size: 15px;
}
.topbar .search .wp-block-search__inside-wrapper::after { content: "⌘K"; margin-left: auto; padding: 1px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); font: 600 11px var(--font); color: var(--faint); }
.topbar .search .wp-block-search__input { flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; font: inherit; color: var(--ink); outline: 0; }
.topbar .search .wp-block-search__input::placeholder { color: var(--faint); opacity: 1; }

/* Boutons : la classe est sur le conteneur div.wp-block-button, le style sur le lien */
.wp-block-buttons.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.wp-block-buttons > .wp-block-button.btn { display: inline-flex; margin: 0; }
.wp-block-button.btn .wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 22px; border-radius: 99px;
  font-family: inherit; font-size: 15.5px; font-weight: 600; line-height: 1.55; white-space: nowrap; word-break: normal;
  border: 1.5px solid transparent; box-shadow: none; text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.wp-block-button.btn .wp-block-button__link::before,
.wp-block-button.btn .wp-block-button__link::after { width: 18px; height: 18px; }
.wp-block-button.btn--solid .wp-block-button__link { background: var(--blue); color: var(--white); }
.wp-block-button.btn--solid .wp-block-button__link:hover { background: var(--blue-hover); }
.wp-block-button.btn--line .wp-block-button__link { border-color: var(--blue); color: var(--blue); background: var(--white); }
.wp-block-button.btn--line .wp-block-button__link:hover { background: var(--blue-softer); }
.wp-block-button.btn--ghost .wp-block-button__link { background: var(--grey); color: var(--ink); }
.wp-block-button.btn--ghost .wp-block-button__link:hover { background: #E4E6EB; }
.wp-block-buttons.btns-block { display: block; margin-top: 18px; }
.wp-block-buttons > .wp-block-button.btn--block { display: flex; width: 100%; }
.wp-block-button.btn--block .wp-block-button__link { width: 100%; height: 54px; border-radius: 14px; }

.content { max-width: 1600px; padding: 32px 40px 28px; }

/* ---------- Cartes ---------- */

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.card__head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.card__head h2 { font-size: 23px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.card__head > div p { margin-top: 4px; color: var(--muted); }
.card__link { display: flex; margin-left: auto; padding-top: 4px; white-space: nowrap; }
.card__link a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--blue); }
.card__link a::after { width: 17px; height: 17px; }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 24px; align-items: start; }
.stack { display: grid; gap: 24px; }
.grid > *, .stack > * { min-width: 0; }
.row { margin-top: 24px; }

/* ---------- Hero ---------- */

.hero { display: grid; grid-template-columns: minmax(0, 1fr) 600px; gap: 32px; align-items: center; margin-bottom: 28px; }
.hero__eyebrow { font-size: 15.5px; font-weight: 600; color: var(--blue); }
.hero h1 { margin: 10px 0 14px; font-size: 52px; font-weight: 800; line-height: 1.06; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero__lead { max-width: 620px; font-size: 18.5px; line-height: 1.55; color: var(--muted); }
.wp-block-buttons.hero__actions { gap: 12px; margin-top: 26px; }

.evc { padding: 22px; }
.evc__top { display: flex; align-items: center; gap: 16px; }
.evc__top h2 { white-space: nowrap; font-size: 20px; font-weight: 800; letter-spacing: -.01em; line-height: 1.55; }
.evc__sub { font-size: 14.5px; color: var(--blue); font-weight: 600; }
.evc__stats { display: flex; margin-left: auto; border: 1px solid #D3E3FC; border-radius: 14px; background: var(--blue-softer); overflow: hidden; }
.evc__stats .stat { padding: 8px 14px; text-align: center; white-space: nowrap; font-size: 12px; line-height: 23.25px; color: var(--muted); }
.evc__stats .stat + .stat { border-left: 1px solid #D3E3FC; }
.evc__stats .stat strong { display: block; font-size: 24px; line-height: 1.1; font-weight: 800; color: var(--blue); letter-spacing: -.02em; }
.evc__links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.linkbox { position: relative; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; font-size: 12.5px; line-height: 1.3; color: var(--muted); transition: border-color .15s; }
.linkbox:hover { border-color: var(--blue); }
.linkbox::before { background: var(--ink); }
.linkbox::after { margin-left: auto; width: 17px; height: 17px; background: var(--ink); }
.linkbox a { display: block; }
.linkbox strong { display: block; font-size: 14.5px; line-height: 1.3; color: var(--ink); }

/* ---------- Parcours (3 tuiles) ---------- */

.paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.path {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 22px; border-radius: 16px; background: var(--blue-softer); border: 1px solid #DCE8FB;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.path:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: 0 10px 24px rgba(24, 119, 242, .12); }
.path::before { content: ""; flex: none; width: 54px; height: 54px; border-radius: 50%; background: var(--b) center / 26px 26px no-repeat, var(--white); box-shadow: 0 2px 8px rgba(16, 24, 40, .08); }
.path::after { position: absolute; top: 24px; right: 22px; color: var(--blue); }
.path h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.55; }
.path p { font-size: 14.5px; color: var(--muted); line-height: 1.5; }

/* ---------- Programme / vidéos ---------- */

.feature { position: relative; overflow: hidden; }
.feature__body { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; align-items: center; }
.feature h2 { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.feature__text { margin-top: 10px; font-size: 17px; color: var(--muted); }
.feature__text strong { color: var(--ink); font-weight: 600; }
.feature__art { position: relative; height: 170px; }
/* Illustration lecteur vidéo, dessinée en CSS : cadre, écran, barre, lignes */
.feature__art::before {
  content: ""; position: absolute; inset: 6px 0 0 18px;
  border-radius: 14px; border: 1px solid var(--line);
  box-shadow: 0 16px 34px rgba(16, 24, 40, .12); transform: rotate(-4deg);
  background:
    linear-gradient(135deg, #1877F2, #0B4FB3) 0 0 / 100% 104px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 14px 118px / calc((100% - 28px) * .46) 5px no-repeat,
    linear-gradient(var(--grey), var(--grey)) 14px 118px / calc(100% - 28px) 5px no-repeat,
    linear-gradient(var(--grey), var(--grey)) 14px 133px / calc(100% - 28px) 7px no-repeat,
    linear-gradient(var(--grey), var(--grey)) 14px 147px / calc((100% - 28px) * .6) 7px no-repeat,
    var(--white);
}
.feature__art::after {
  content: ""; position: absolute; left: 95px; top: 37px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--play-blue) 16px 14.5px / 15px 15px no-repeat, rgba(255, 255, 255, .95);
  transform: rotate(-4deg);
}
.player-badge { position: absolute; right: -6px; bottom: 6px; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: var(--white); box-shadow: 0 10px 24px rgba(16, 24, 40, .14); font-size: 13px; font-weight: 700; transform: rotate(3deg); }
.player-badge::before { width: 17px; height: 17px; background: var(--blue); }
.cta-bar {
  position: relative; display: flex; align-items: center; gap: 18px;
  margin-top: 24px; padding: 14px 24px 14px 14px; border-radius: 16px;
  background: var(--blue); color: var(--white); font-size: 19px; font-weight: 700;
  box-shadow: 0 12px 26px rgba(24, 119, 242, .3);
  transition: background .15s;
}
.cta-bar:hover { background: var(--blue-hover); }
.cta-bar::before { content: ""; flex: none; width: 52px; height: 52px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .55); background: var(--play-white) center / 18px 18px no-repeat; }
.cta-bar a { flex: 1; text-align: center; }
.resume { position: relative; display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; }
.resume::before { content: ""; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--play-blue) center / 13px 13px no-repeat, var(--blue-soft); }
.resume::after { margin-left: auto; }
.resume strong { font-weight: 700; }
.resume__meta { color: var(--muted); font-size: 14px; line-height: 23.25px; }

/* Onglets vidéos */
.tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 14px; background: var(--grey); margin-bottom: 22px; }
.tab { display: inline-flex; align-items: center; gap: 9px; padding: 10px 18px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer; user-select: none; }
.tab::before { width: 18px; height: 18px; }
.tab.is-active { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.tab-panel { display: none; }
.tab-panel.is-active { display: grid; }
.videos { grid-template-columns: repeat(3, 1fr); gap: 18px; }
.video { position: relative; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.video:hover { border-color: #BCD5FA; box-shadow: 0 10px 24px rgba(16, 24, 40, .08); }
.video__thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--blue-softer); }
.video__thumb::before { content: ""; position: absolute; right: -14px; bottom: -18px; width: 120px; height: 120px; background: #CFE0FB; -webkit-mask: var(--t) center / contain no-repeat; mask: var(--t) center / contain no-repeat; }
.video__thumb--deep { background: linear-gradient(135deg, #1877F2, #0B4FB3); }
.video__thumb--deep::before { background: rgba(255, 255, 255, .16); }
.video__thumb::after { content: ""; position: absolute; left: 18px; bottom: 16px; width: 46px; height: 46px; border-radius: 50%; background: var(--play-blue) 17px 15.5px / 15px 15px no-repeat, var(--white); box-shadow: 0 6px 16px rgba(16, 24, 40, .16); }
.video__time { position: absolute; top: 14px; left: 16px; z-index: 1; padding: 3px 9px; border-radius: 8px; background: rgba(28, 30, 33, .78); color: var(--white); font-size: 12px; font-weight: 600; }
.video__thumb--deep .video__time { background: rgba(255, 255, 255, .2); }
.video__body { padding: 16px 18px 18px; }
.video__tag { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.video h3 { margin-top: 6px; font-size: 16.5px; font-weight: 700; line-height: 1.35; }
.video__body p { margin-top: 6px; font-size: 14px; color: var(--muted); line-height: 1.45; }

/* ---------- Colonne latérale ---------- */

.list { display: grid; }
.list__item { position: relative; display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.list__item:first-child { border-top: 0; padding-top: 0; }
.list__item::before { width: 22px; height: 22px; background: var(--blue); }
.list__item a { font-size: 15.5px; font-weight: 600; }
.list__item em { margin-left: auto; font-style: normal; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.list__item--go::after { width: 17px; height: 17px; margin-left: auto; background: var(--faint); }

.subhead { margin: 22px 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.subhead:first-of-type { margin-top: 0; }

.today { display: grid; gap: 4px; }
.today__item { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; }
.today__item::before { content: ""; flex: none; width: 4px; height: 40px; margin-top: 2px; border-radius: 4px; background: var(--blue); }
.today__item.is-alt::before { background: #9CC2F8; }
.today__text { font-size: 13.5px; line-height: 23.25px; color: var(--muted); }
.today__text strong { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.pill { margin-left: auto; flex: none; padding: 3px 10px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-size: 12.5px; font-weight: 600; }

.facts { display: grid; gap: 14px; }
.fact { display: flex; gap: 14px; }
.fact__n { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 800; font-size: 14px; }
.fact__text { font-size: 14px; color: var(--muted); line-height: 1.5; }
.fact__text strong { display: block; font-size: 15px; line-height: 1.55; color: var(--ink); }

/* ---------- Annales ---------- */

.annales { display: grid; }
.annale { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.annale:first-child { border-top: 0; padding-top: 0; }
.annale__year { display: grid; place-items: center; width: 64px; height: 48px; border-radius: 12px; background: var(--grey); font-weight: 800; font-size: 16px; }
.annale__text { font-size: 13.5px; line-height: 23.25px; color: var(--muted); }
.annale__text strong { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.55; color: var(--ink); }
.wp-block-buttons.annale__actions { display: flex; flex-wrap: nowrap; gap: 8px; margin-left: auto; }
.wp-block-buttons > .wp-block-button.mini { display: inline-flex; margin: 0; }
.wp-block-button.mini .wp-block-button__link { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-family: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.55; white-space: nowrap; transition: border-color .15s, color .15s; }
.wp-block-button.mini .wp-block-button__link::before { width: 16px; height: 16px; }
.wp-block-button.mini .wp-block-button__link:hover { border-color: var(--blue); color: var(--blue); }
.wp-block-button.mini--blue .wp-block-button__link { background: var(--blue); border-color: var(--blue); color: var(--white); }
.wp-block-button.mini--blue .wp-block-button__link:hover { background: var(--blue-hover); color: var(--white); }

/* ---------- Livres ---------- */

.books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.book { position: relative; }
.book__cover {
  position: relative; aspect-ratio: 3 / 4; padding: 18px 16px; border-radius: 6px 14px 14px 6px;
  background: linear-gradient(160deg, #1877F2, #0B4FB3); color: var(--white);
  box-shadow: inset 6px 0 0 rgba(0, 0, 0, .14), 0 12px 24px rgba(11, 79, 179, .22);
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .2s;
}
.book:hover .book__cover { transform: translateY(-4px) rotate(-1deg); }
.book__cover--light { background: linear-gradient(160deg, #E7F0FE, #CFE0FB); color: var(--blue-deep); box-shadow: inset 6px 0 0 rgba(11, 79, 179, .12), 0 12px 24px rgba(11, 79, 179, .14); }
.book__cover--ink { background: linear-gradient(160deg, #2D3340, #1C1E21); }
.book__cover::before { content: ""; position: absolute; right: -16px; bottom: 18px; width: 86px; height: 86px; background: currentColor; opacity: .18; -webkit-mask: var(--t) center / contain no-repeat; mask: var(--t) center / contain no-repeat; }
.cover__brand { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.cover__title { margin-top: 10px; font-size: 18px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.cover__tag { margin-top: auto; font-size: 11px; font-weight: 700; letter-spacing: .1em; opacity: .85; }
.book h3 { margin-top: 14px; font-size: 15px; font-weight: 700; line-height: 1.35; }
.book > p { font-size: 13.5px; color: var(--muted); }

/* ---------- Conseil ---------- */

.tip { display: flex; align-items: center; gap: 24px; padding: 22px 28px; }
.tip h2 { font-size: 22px; font-weight: 800; color: var(--blue); letter-spacing: -.02em; white-space: nowrap; line-height: 1.55; }
.tip__quote { margin: 0; font-size: 18px; font-style: italic; color: var(--blue-deep); line-height: 1.5; }

.legal { margin-top: 28px; font-size: 13.5px; color: var(--faint); }
.legal a { white-space: nowrap; }
.row--split { grid-template-columns: 1fr 1fr; }

/* ---------- Pages de cours ---------- */

.crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; font-size: 15px; color: var(--muted); }
.crumbs a:hover { color: var(--blue); }
.crumbs em, .crumbs strong { display: inline-flex; align-items: center; gap: 8px; font-style: normal; }
.crumbs strong { color: var(--ink); font-weight: 600; }
.crumbs em::before, .crumbs strong::before { width: 15px; height: 15px; background: var(--faint); }

.page-head { display: flex; align-items: center; gap: 24px; margin-bottom: 28px; }
.page-head__text { flex: 1; min-width: 0; }
.page-head h1 { margin: 4px 0 8px; font-size: 48px; font-weight: 800; line-height: 1.08; letter-spacing: -.035em; }
.page-head .hero__lead { max-width: 760px; }
.page-head__stats { align-self: center; margin-left: 0; }
.page-head.has-chip::before { width: 84px; height: 84px; border-radius: 22px; align-self: flex-start; margin-top: 6px; background-size: 38px 38px, auto; }

[id] { scroll-margin-top: 110px; }

.chapters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; counter-reset: chapitre; }
.chapters > li { position: relative; counter-increment: chapitre; display: flex; align-items: center; gap: 14px; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; font-size: 15px; font-weight: 600; line-height: 1.4; transition: border-color .15s, background .15s; }
.chapters > li:hover { border-color: var(--blue); background: var(--blue-softer); }
.chapters > li::before { content: counter(chapitre); flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 800; font-size: 14px; line-height: 1.55; }
.chapters > li a { flex: 1; }
.chapters > li::after, .courses > li::after { width: 17px; height: 17px; margin-left: auto; background: var(--faint); }
.chapters > li:hover::after, .courses > li:hover::after { background: var(--blue); }

.tip--stack { flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px; }
.tip--stack .tip__quote { font-size: 16px; }

.wp-block-buttons.jump { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.wp-block-buttons.jump > .wp-block-button { display: inline-flex; margin: 0; }
.wp-block-buttons.jump .wp-block-button__link { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 0; border-radius: 99px; background: var(--grey); color: var(--ink); font-family: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.55; white-space: nowrap; transition: background .15s, color .15s; }
.wp-block-buttons.jump .wp-block-button__link::before { width: 17px; height: 17px; background: var(--blue); }
.wp-block-buttons.jump .wp-block-button__link:hover { background: var(--blue); color: var(--white); }
.wp-block-buttons.jump .wp-block-button__link:hover::before { background: var(--white); }

.blocs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.bloc { padding: 24px; }
.bloc__head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.bloc__head h2 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.bloc__head .pill { font-size: 13px; }
.courses { list-style: none; margin: 0; padding: 0; }
.courses > li + li { border-top: 1px solid var(--line); }
.courses > li { position: relative; display: flex; align-items: center; gap: 12px; padding: 13px 6px 13px 4px; font-size: 15.5px; font-weight: 500; line-height: 1.4; }
.courses > li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #9CC2F8; }
.courses > li:hover { color: var(--blue); }
.courses > li:hover::before { background: var(--blue); }

/* ---------- Vidéos, annales, livres ---------- */

.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.session { padding: 24px; }
.session .annale::before { width: 22px; height: 22px; background: var(--blue); }
.session .annale__year { height: 44px; background: var(--blue-soft); color: var(--blue); }
.book-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.book-card { display: grid; gap: 22px; }
.book-card .book__cover { width: 62%; justify-self: center; }
.book-card .cover__title { font-size: 22px; }
.book-card:hover .book__cover { transform: translateY(-4px) rotate(-1deg); }
.book-card__body h2 { margin-top: 4px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.55; }
.book-card__body p:not(.video__tag) { margin: 8px 0 18px; color: var(--muted); }

/* ---------- Connecté : la barre d'administration ---------- */

.admin-bar .sidebar { top: 32px; height: calc(100vh - 32px); }
.admin-bar .topbar { top: 32px; }

/* ---------- Responsive ---------- */

@media (max-width: 1400px) {
  .hero { grid-template-columns: 1fr; }
  .grid { grid-template-columns: minmax(0, 1fr) 380px; }
  .chapters { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .book-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1180px) {
  .grid { grid-template-columns: 1fr; }
  .topbar .search { display: none; }
  .blocs { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; width: min(var(--sidebar), 86vw); transform: translateX(-100%); transition: transform .25s; }
  .admin-bar .sidebar { top: 0; height: 100vh; }
  .is-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .2); }
  .app.is-open::after { content: ""; position: fixed; inset: 0; z-index: 40; background: rgba(28, 30, 33, .35); }
  .topbar { height: 68px; padding: 0 16px; }
  .topbar .topbar__menu { display: flex; }
  .topbar .topbar__logo { display: block; }
  .topbar .topbar__logo img { height: 34px; width: auto; mix-blend-mode: multiply; }
  .topbar .topbar__crumb { display: none; }
  .topbar .wp-block-buttons > .wp-block-button.btn--line { display: none; }
  .content { padding: 24px 16px; }
}

@media (max-width: 782px) {
  .admin-bar .topbar { top: 46px; }
}

@media (max-width: 720px) {
  .hero h1 { font-size: 36px; }
  .hero__lead { font-size: 16.5px; }
  .card { padding: 20px; }
  .evc__top { flex-wrap: wrap; }
  .evc__stats { margin-left: 0; width: 100%; }
  .evc__stats .stat { flex: 1; }
  .evc__links { grid-template-columns: 1fr; }
  .paths, .videos { grid-template-columns: 1fr; }
  .feature__body { grid-template-columns: 1fr; }
  .feature__art { display: none; }
  .feature h2 { font-size: 27px; }
  .cta-bar { font-size: 16.5px; }
  .tabs { display: flex; }
  .tab { flex: 1; justify-content: center; padding: 10px 8px; font-size: 14px; }
  .annale { flex-wrap: wrap; }
  .card__head { flex-wrap: wrap; }
  .card__head > div { flex: 1; min-width: 0; }
  .card__link { width: 100%; margin-left: 70px; padding-top: 0; }
  .wp-block-buttons.annale__actions { margin-left: 80px; flex-wrap: wrap; }
  .tip { flex-direction: column; align-items: flex-start; gap: 10px; }
  .books { gap: 12px; }
  .cover__title { font-size: 14px; }
  .topbar .wp-block-button.btn .wp-block-button__link { height: 40px; padding: 0 16px; font-size: 14.5px; }

  .page-head { flex-wrap: wrap; gap: 16px; }
  .page-head.has-chip::before { width: 60px; height: 60px; border-radius: 16px; background-size: 28px 28px, auto; }
  .page-head h1 { font-size: 34px; }
  .page-head__stats { width: 100%; }
  .page-head__stats .stat { flex: 1; }
  .wp-block-buttons.jump { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 20px; padding: 0 16px; scrollbar-width: none; }
  .wp-block-buttons.jump > .wp-block-button { flex: none; }
  .bloc { padding: 20px; }

  .video-grid, .book-list { grid-template-columns: 1fr; }
  .session .wp-block-buttons.annale__actions { margin-left: 38px; }
}

:where(a, input, [tabindex]):focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.page-404__titre { font-size: 36px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin-bottom: 10px; }
.card .wp-block-query .wp-block-post-title { font-size: 21px; font-weight: 800; margin-top: 18px; }
