/* Pages année et thème (année → thème → compétences C1 à C5) */
.hero-theme { padding-bottom: 28px; }
.fil { font-size: 0.9rem; color: var(--gris); margin: 0 0 10px; }
.fil a { color: var(--gris); }

.sommaire-comp { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.sommaire-comp a {
  background: var(--blanc); border: 1px solid #DCE7EF; border-radius: 999px;
  padding: 6px 14px; text-decoration: none; color: var(--marine); font-size: 0.9rem;
}
.sommaire-comp a b { color: var(--bleu); margin-right: 4px; }

.competence { padding: 34px 0; border-top: 1px solid #E6EEF4; }
.comp-tete { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.comp-tete h2 { margin: 0; }
.comp-code {
  display: inline-block; background: var(--marine); color: var(--blanc);
  font-weight: bold; border-radius: 10px; padding: 4px 12px; font-size: 1.1rem;
}

.ressources { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.res {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--rayon); border: 1px solid #DCE7EF; background: var(--blanc);
}
.res.libre { background: var(--vert-pale); border-color: #B5E0F7; }
.res.verrou { background: #F7F9FB; color: var(--gris); }
.res-type {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--gris); min-width: 7.5em;
}
.res a { font-weight: bold; }
.res-etat { font-size: 0.85rem; white-space: nowrap; border-radius: 999px; padding: 3px 10px; }
.res-etat.gratuit { background: #0A6FA8; color: var(--blanc); }
.res-etat.a-venir { background: var(--vert-clair); color: #075E91; }
.res-etat.pack { background: var(--orange-clair); color: #9A4A06; }

.grille-themes { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.carte-theme {
  display: block; padding: 20px; border-radius: var(--rayon); border: 1px solid #DCE7EF;
  background: var(--blanc); text-decoration: none; color: var(--texte); box-shadow: var(--ombre-douce);
}
.carte-theme:hover, .carte-theme:focus-visible { border-color: var(--bleu); }
.carte-theme .num { font-size: 0.8rem; color: var(--bleu); font-weight: bold; text-transform: uppercase; }
.carte-theme h3 { margin: 6px 0 10px; color: var(--marine); }
.autre-annee { margin-top: 24px; }
.nav-themes { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 600px) {
  .res { grid-template-columns: 1fr; gap: 6px; }
  .res-etat { justify-self: start; white-space: normal; }
}

/* Chaque compétence encadrée en bleu foncé */
.competence { border-top: 0; padding: 18px 0; }
.competence > .conteneur {
  border: 2px solid var(--marine); border-radius: 14px;
  padding: 20px 22px; background: var(--blanc); box-sizing: border-box;
  max-width: min(1040px, calc(100% - 32px));
}
.sommaire-comp a { border: 2px solid var(--marine); }
@media (max-width: 600px) {
  .competence > .conteneur { padding: 16px 14px; max-width: calc(100% - 24px); }
}
.res-etat.acheter { background: #B45309; color: #FFFFFF; text-decoration: none; font-weight: bold; }
.res-etat.acheter:hover, .res-etat.acheter:focus-visible { background: #8A3F07; }
#achats-theme { margin-top: 18px; }
#achats-theme span.bouton[aria-disabled] { opacity: .7; cursor: default; }
.titre-pack { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 0 0 16px; }
.titre-pack h1 { margin: 0; flex: 1 1 420px; }
.hero .titre-pack .bouton-pack { margin: 0; flex: 0 1 auto; max-width: 100%; white-space: normal !important; text-align: center; }

/* Finition des pages thème */
.hero-theme h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
.competence > .conteneur { padding: 30px 34px; border-radius: 20px; }
.comp-tete h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.comp-code { font-size: 1.3rem; padding: 10px 18px; }
.res { padding: 18px 22px; border-radius: 16px; font-size: 1.12rem; margin-bottom: 12px; }
.res-type { font-size: .9rem; letter-spacing: .06em; }
.res-etat { font-size: 1rem; padding: 6px 16px; font-weight: bold; }
.res-etat.acheter { font-size: 1.02rem; padding: 8px 20px; }
.sommaire-comp a { font-size: 1.05rem; padding: 12px 18px; }

/* Compétences : un encadré coloré par compétence, intérieur plus clair, avec son jeton */
.competence { --cc: #1E5AA8; --cl: #EAF2FC; }
.competence.c-1 { --cc: #1E5AA8; --cl: #EAF2FC; }
.competence.c-2 { --cc: #7B3FA8; --cl: #F4ECFA; }
.competence.c-3 { --cc: #1F7A4D; --cl: #E7F5EC; }
.competence.c-4 { --cc: #C4620F; --cl: #FDF0E2; }
.competence.c-5 { --cc: #0E7E8C; --cl: #E3F5F7; }
.competence.c-6 { --cc: #A3173F; --cl: #FBE9EE; }
.competence[class*="c-"] > .conteneur { border: 3px solid var(--cc); background: var(--cl); background-image: none; }
.competence[class*="c-"] .comp-code { background: var(--cc); color: #fff; }
.competence[class*="c-"] .comp-tete h2 { color: var(--cc); }
.comp-tete { align-items: center; }
.comp-tete .jeton { margin-left: auto; width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--cc); box-shadow: 0 2px 8px rgba(0,0,0,.18); object-fit: cover; background: #fff; }
.competence[class*="c-"] .res { background: #fff; border-color: color-mix(in srgb, var(--cc) 35%, #fff); }
.competence[class*="c-"] .res.libre { background: #fff; border-color: var(--cc); }
.sommaire-comp a.s-1 { border-color: #1E5AA8; } .sommaire-comp a.s-1 b { color: #1E5AA8; }
.sommaire-comp a.s-2 { border-color: #7B3FA8; } .sommaire-comp a.s-2 b { color: #7B3FA8; }
.sommaire-comp a.s-3 { border-color: #1F7A4D; } .sommaire-comp a.s-3 b { color: #1F7A4D; }
.sommaire-comp a.s-4 { border-color: #C4620F; } .sommaire-comp a.s-4 b { color: #C4620F; }
.sommaire-comp a.s-5 { border-color: #0E7E8C; } .sommaire-comp a.s-5 b { color: #0E7E8C; }
.sommaire-comp a.s-6 { border-color: #A3173F; } .sommaire-comp a.s-6 b { color: #A3173F; }
@media (max-width: 600px) { .comp-tete .jeton { width: 48px; height: 48px; } }

/* Ressources : type et titre en gras, couleur de la compétence, contour foncé */
.competence.c-1 { --cd: #123B73; } .competence.c-2 { --cd: #4F2573; } .competence.c-3 { --cd: #135234; }
.competence.c-4 { --cd: #8A4108; } .competence.c-5 { --cd: #095560; } .competence.c-6 { --cd: #6E0F29; }
.competence[class*="c-"] .res { border: 2px solid var(--cd); }
.competence[class*="c-"] .res.verrou { color: var(--cd); }
.competence[class*="c-"] .res-type { color: var(--cc); font-weight: 800; }
.competence[class*="c-"] .res-titre, .competence[class*="c-"] .res a { color: var(--cd); font-weight: 800; }
.competence[class*="c-"] .res.libre { border-color: var(--cd); border-width: 3px; }
.competence[class*="c-"] .res a.res-etat, .competence[class*="c-"] .res a.acheter { color: #FFFFFF; font-weight: 800; }
.competence[class*="c-"] .res .res-etat.gratuit { color: #FFFFFF; }

/* Un thème = une couleur (pages 1re, Terminale et liste de la page d'accueil) */
.carte-theme[href*="1re-organisation"] { --tc:#1E5AA8; --tl:#EAF2FC; --td:#123B73; }
.theme-dispo:has(a[href*="1re-organisation"]) { --tc:#1E5AA8; --tl:#EAF2FC; --td:#123B73; }
.carte-theme[href*="1re-respiratoire"] { --tc:#0E8AA6; --tl:#E2F4F8; --td:#085568; }
.theme-dispo:has(a[href*="1re-respiratoire"]) { --tc:#0E8AA6; --tl:#E2F4F8; --td:#085568; }
.carte-theme[href*="1re-locomoteur"] { --tc:#C4620F; --tl:#FDF0E2; --td:#8A4108; }
.theme-dispo:has(a[href*="1re-locomoteur"]) { --tc:#C4620F; --tl:#FDF0E2; --td:#8A4108; }
.carte-theme[href*="1re-digestif"] { --tc:#3F8A2A; --tl:#EAF6E3; --td:#27561A; }
.theme-dispo:has(a[href*="1re-digestif"]) { --tc:#3F8A2A; --tl:#EAF6E3; --td:#27561A; }
.carte-theme[href*="1re-cardio-vasculaire"] { --tc:#C0283A; --tl:#FCE9EC; --td:#7D1624; }
.theme-dispo:has(a[href*="1re-cardio-vasculaire"]) { --tc:#C0283A; --tl:#FCE9EC; --td:#7D1624; }
.carte-theme[href*="terminale-milieu-interieur"] { --tc:#2F6FB5; --tl:#E6F0FA; --td:#1B4678; }
.theme-dispo:has(a[href*="terminale-milieu-interieur"]) { --tc:#2F6FB5; --tl:#E6F0FA; --td:#1B4678; }
.carte-theme[href*="terminale-genes"] { --tc:#7B3FA8; --tl:#F4ECFA; --td:#4F2573; }
.theme-dispo:has(a[href*="terminale-genes"]) { --tc:#7B3FA8; --tl:#F4ECFA; --td:#4F2573; }
.carte-theme[href*="terminale-immunite"] { --tc:#B7791F; --tl:#FBF3DF; --td:#7A4F0E; }
.theme-dispo:has(a[href*="terminale-immunite"]) { --tc:#B7791F; --tl:#FBF3DF; --td:#7A4F0E; }
.carte-theme[href*="terminale-reproduction"] { --tc:#C2477F; --tl:#FCE9F2; --td:#7E2450; }
.theme-dispo:has(a[href*="terminale-reproduction"]) { --tc:#C2477F; --tl:#FCE9F2; --td:#7E2450; }
.carte-theme[href*="theme-"] { background: var(--tl); border: 3px solid var(--tc); }
.carte-theme[href*="theme-"] .num { color: var(--tc); font-weight: 800; }
.carte-theme[href*="theme-"] h3 { color: var(--td); font-weight: 800; }
.carte-theme[href*="theme-"]:hover, .carte-theme[href*="theme-"]:focus-visible { border-color: var(--td); box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.theme-dispo[class] { border-left: 8px solid var(--tc, #1E5AA8); background: var(--tl, #fff); padding-left: 12px; border-radius: 10px; margin: 6px 0; border-top: none; }
.theme-dispo .theme-nom { color: var(--td, #14213d); font-weight: 800; }

/* Message pour les élèves : bloc violet */
.message-eleves { padding: 28px 0; }
.carte-message { background: #F4ECFA; border: 3px solid #7B3FA8; border-radius: 20px; padding: 26px 30px; }
.carte-message h2 { color: #4F2573; font-weight: 800; margin-top: 0; }
.carte-message .etapes-usage { counter-reset: e; list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; }
.carte-message .etapes-usage li { counter-increment: e; background: #fff; border: 2px solid #C9A9E3; border-radius: 12px; padding: 12px 16px 12px 56px; position: relative; color: #2b1840; }
.carte-message .etapes-usage li::before { content: counter(e); position: absolute; left: 14px; top: 10px; width: 30px; height: 30px; border-radius: 50%; background: #7B3FA8; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.carte-message .etapes-usage strong { color: #4F2573; }
.carte-message .petit { color: #4F2573; }
.carte-message .mot-prof { background: #7B3FA8; color: #fff; border-radius: 12px; padding: 12px 16px; margin: 14px 0 0; }
@media (max-width: 600px) { .carte-message { padding: 18px 14px; } .carte-message .etapes-usage li { padding-left: 52px; } }

/* Pages année (8/11/2026) : cartes de thème vives, une couleur par thème, pictogramme SVG, rotation au survol.
   Texte blanc : contraste au moins 4,5:1 sur la couleur la plus claire du dégradé. */
.carte-theme[href*="1re-organisation"] { --v1:#1E5AA8; --v2:#0B3D91; }
.carte-theme[href*="1re-locomoteur"] { --v1:#A5560B; --v2:#6E3906; }
.carte-theme[href*="1re-digestif"] { --v1:#317A1E; --v2:#1F4F12; }
.carte-theme[href*="1re-cardio-vasculaire"] { --v1:#C0283A; --v2:#7D1624; }
.carte-theme[href*="1re-respiratoire"] { --v1:#0E7490; --v2:#085568; }
.carte-theme[href*="terminale-milieu-interieur"] { --v1:#1D6FB8; --v2:#0B3D91; }
.carte-theme[href*="terminale-immunite"] { --v1:#8A5A00; --v2:#5C3C00; }
.carte-theme[href*="terminale-reproduction"] { --v1:#AD2D6B; --v2:#6E1B44; }
.carte-theme[href*="terminale-genes"] { --v1:#7B3FA8; --v2:#4F2573; }
.grille-themes { gap: 22px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.carte-theme.carte-tourne { display: block; padding: 0; border: none; background: none; box-shadow: none; border-radius: var(--rayon); }
.carte-theme.carte-tourne:focus-visible { outline: 3px solid #B45309; outline-offset: 4px; }
.carte-face { display: flex; flex-direction: column; height: 100%; min-height: 200px; padding: 22px 22px 18px; border-radius: var(--rayon);
  background: radial-gradient(circle at 100% 0%, rgba(255,255,255,.10), transparent 30%), linear-gradient(150deg, var(--v1, #1E5AA8) 0%, var(--v2, #0B3D91) 100%);
  color: #fff; box-shadow: 0 12px 26px rgba(11,61,145,.22); transition: box-shadow .2s ease; }
.carte-theme.carte-tourne:hover .carte-face, .carte-theme.carte-tourne:focus-visible .carte-face { box-shadow: 0 18px 36px rgba(11,61,145,.34); }
.carte-picto { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 14px; background: rgba(255,255,255,.18); margin-bottom: 14px; }
.carte-picto svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.carte-theme.carte-tourne .num { color: #fff; font-weight: 800; letter-spacing: .06em; opacity: .95; }
.carte-theme.carte-tourne h3 { color: #fff; font-weight: 800; margin: 4px 0 12px; flex: 1; }
.carte-theme.carte-tourne .petit { color: #fff; font-size: .9rem; background: rgba(0,0,0,.18); align-self: flex-start; padding: 3px 12px; border-radius: 999px; }
