/* Site de la Communauté des Talents Pédagogiques
   Couleurs tirées du logo : orange, rouge, bleu, magenta, anthracite, sur le fond sombre #232323. */

:root {
  --orange: #f08a00;
  --rouge: #d9271c;
  --bleu: #1593d1;
  --magenta: #b8166f;
  --anthracite: #3b4855;
  --nuit: #232323;

  --fond: #faf8f5;
  --surface: #ffffff;
  --texte: #1f2125;
  --texte-doux: #5a6068;
  --ligne: #e6e1da;
  --accent: #b8166f;
  --accent-fort: #8f0f55;
  --ombre: 0 1px 2px rgb(0 0 0 / .05), 0 6px 20px rgb(0 0 0 / .06);

  --rayon: 14px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #1b1c1e;
    --surface: #25272a;
    --texte: #ecebe8;
    --texte-doux: #a9adb3;
    --ligne: #383b40;
    --accent: #ef6aae;
    --accent-fort: #f58cc2;
    --ombre: 0 1px 2px rgb(0 0 0 / .3), 0 6px 20px rgb(0 0 0 / .25);
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 400 1rem/1.6 var(--sans);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-fort); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); margin: 0 0 .6rem; letter-spacing: -.01em; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.65rem); margin: 2.2rem 0 .8rem; }
p { margin: 0 0 1rem; }

.conteneur { width: min(1160px, 100% - 32px); margin-inline: auto; }
.etroit { width: min(760px, 100% - 32px); }

.evitement { position: absolute; left: -9999px; }
.evitement:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface); padding: .5rem 1rem; }

/* En-tête */
.entete { background: var(--nuit); color: #fff; }
.entete__barre { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; flex-wrap: wrap; }
.marque { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; font-size: .9rem; line-height: 1.2; }
.marque:hover { color: #fff; }
.marque strong { font-weight: 700; font-size: 1.05rem; }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a { color: #e9e9e9; text-decoration: none; padding: .45rem .8rem; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.nav a:hover { background: rgb(255 255 255 / .1); color: #fff; }
.nav a[aria-current="page"] { background: #fff; color: var(--nuit); }

/* Cinq traits de pinceau du logo */
.traits { display: grid; grid-template-columns: repeat(5, 1fr); height: 5px; }
.traits i:nth-child(1) { background: var(--orange); }
.traits i:nth-child(2) { background: var(--rouge); }
.traits i:nth-child(3) { background: var(--bleu); }
.traits i:nth-child(4) { background: var(--magenta); }
.traits i:nth-child(5) { background: var(--anthracite); }

/* Accueil */
.une { background: var(--nuit); color: #f2f2f2; padding-block: clamp(2rem, 6vw, 4rem); }
.une__grille { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; }
.une h1 { color: #fff; }
.une .chapo { color: #d6d6d6; }
.une__logo { width: min(340px, 100%); justify-self: center; }
.surtitre { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 600; color: var(--orange); margin-bottom: .8rem; }
.chapo { font-size: 1.12rem; color: var(--texte-doux); max-width: 62ch; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }

.bouton { display: inline-block; background: var(--magenta); color: #fff; text-decoration: none; font-weight: 600; padding: .7rem 1.2rem; border-radius: 999px; border: 2px solid var(--magenta); }
.bouton:hover { background: #9c1260; border-color: #9c1260; color: #fff; }
.bouton--clair { background: transparent; border-color: #fff; color: #fff; }
.bouton--clair:hover { background: #fff; color: var(--nuit); border-color: #fff; }
.bouton--petit { padding: .35rem .85rem; font-size: .88rem; margin-top: .4rem; }

.chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: -1.6rem 0 0; position: relative; }
.chiffres div { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1rem 1.2rem; }
.chiffres dt { color: var(--texte-doux); font-size: .88rem; }
.chiffres dd { margin: 0; font: 600 clamp(1.6rem, 4vw, 2.2rem)/1.1 var(--serif); font-variant-numeric: tabular-nums; }

.section { margin-top: 2.5rem; }
.section__tete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.section__tete h2 { margin-bottom: .8rem; }

.annonce { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1.3rem 1.5rem; border-left: 6px solid var(--orange); }
.annonce + .annonce { margin-top: 1rem; }
.annonce__titre { font: 600 1.25rem/1.3 var(--serif); margin-bottom: .4rem; }
.annonce__date { color: var(--orange); font-weight: 600; margin-bottom: .3rem; }

/* Puces de thème */
.puces { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.puce { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--ligne); color: var(--texte); text-decoration: none; font-size: .9rem; font-weight: 500; }
.puce::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--c); flex: none; }
.puce:hover { border-color: var(--c); color: var(--texte); }
.puce--orange { --c: var(--orange); }
.puce--rouge { --c: var(--rouge); }
.puce--bleu { --c: var(--bleu); }
.puce--magenta { --c: var(--magenta); }
.puce--anthracite { --c: #6b7a88; }
.puce__n { color: var(--texte-doux); font-variant-numeric: tabular-nums; }

/* Cartes de webinaire */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; }
.carte { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.carte:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgb(0 0 0 / .06), 0 12px 28px rgb(0 0 0 / .1); }
.carte__lien { display: block; color: inherit; text-decoration: none; height: 100%; }
.carte__lien:hover { color: inherit; }
.carte__image { position: relative; aspect-ratio: 16 / 9; background: var(--nuit); }
.carte__image img { width: 100%; height: 100%; object-fit: cover; }
.carte__num { position: absolute; left: .6rem; top: .6rem; background: rgb(35 35 35 / .85); color: #fff; font-size: .78rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px; }
.carte__corps { padding: .9rem 1rem 1.1rem; }
.carte__date { color: var(--texte-doux); font-size: .82rem; margin-bottom: .3rem; }
.carte__titre { font-size: 1.08rem; margin: 0 0 .4rem; }
.carte__qui { font-size: .88rem; color: var(--texte-doux); margin: 0; }

.titre-page { padding-block: 2rem 1rem; }
.fil { font-size: .9rem; color: var(--texte-doux); margin-bottom: .6rem; }
.annee h2 { display: flex; align-items: baseline; gap: .7rem; border-bottom: 1px solid var(--ligne); padding-bottom: .4rem; }
.annee h2 span { font: 400 .9rem var(--sans); color: var(--texte-doux); }

/* Fiche d'un webinaire */
.fiche__meta { color: var(--texte-doux); }
.fiche__grille { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; align-items: start; }
.fiche__texte > h2:first-of-type { margin-top: 1.6rem; }
.video { aspect-ratio: 16 / 9; border-radius: var(--rayon); overflow: hidden; background: var(--nuit); box-shadow: var(--ombre); }
.video iframe { width: 100%; height: 100%; border: 0; }
.video__lien { font-size: .9rem; margin-top: .5rem; }
.points, .sources { padding-left: 1.2rem; }
.points li, .sources li { margin-bottom: .45rem; }
.sources a { overflow-wrap: anywhere; }
.badge { display: inline-block; vertical-align: middle; font: 600 .72rem/1 var(--sans); text-transform: uppercase; letter-spacing: .05em; color: #8a4b00; background: #fff1dc; border-radius: 999px; padding: .35rem .6rem; }
.origine { margin-top: 2rem; border-top: 1px solid var(--ligne); padding-top: 1rem; color: var(--texte-doux); font-size: .95rem; }
.origine summary { cursor: pointer; font-weight: 600; color: var(--texte); margin-bottom: .8rem; }
.origine a { overflow-wrap: anywhere; }

.encart { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1.2rem 1.3rem; position: sticky; top: 1rem; }
.encart h2 { margin-top: 0; font-size: 1.2rem; }
.encart__note { font-size: .85rem; color: var(--texte-doux); margin: 1rem 0 0; }
.personne { display: flex; gap: .8rem; align-items: flex-start; padding-block: .7rem; border-top: 1px solid var(--ligne); }
.personne:first-of-type { border-top: 0; }
.personne__nom { font-weight: 600; margin: 0; }
.personne__nom a { color: inherit; text-decoration: none; }
.personne__nom a:hover { text-decoration: underline; }
.personne__role { color: var(--texte-doux); font-size: .88rem; margin: .1rem 0 0; }
.avatar { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--anthracite); color: #fff; font-weight: 600; font-size: .9rem; letter-spacing: .02em; }

.suite { display: flex; justify-content: space-between; gap: 1rem; margin-block: 3rem 1rem; padding-top: 1.2rem; border-top: 1px solid var(--ligne); font-size: .92rem; }
.suite a { max-width: 45%; }
.suite a:last-child { text-align: right; }

/* Intervenant·es */
.profils { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; margin-bottom: 2rem; align-items: start; }
.profil { display: flex; gap: 1rem; background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 1.1rem 1.2rem; scroll-margin-top: 1rem; }
.profil:target { outline: 3px solid var(--orange); }
.profil h2 { font-size: 1.15rem; margin: .2rem 0 .1rem; }
.profil__liste { margin: .6rem 0 0; padding-left: 1.1rem; font-size: .92rem; }
.profil__liste li { margin-bottom: .3rem; }
.profil__liste span { color: var(--texte-doux); }
.profil:nth-child(5n+1) .avatar { background: var(--orange); }
.profil:nth-child(5n+2) .avatar { background: var(--rouge); }
.profil:nth-child(5n+3) .avatar { background: var(--bleu); }
.profil:nth-child(5n+4) .avatar { background: var(--magenta); }

/* Pied de page */
.pied { background: var(--nuit); color: #cfcfcf; margin-top: 4rem; padding-block: 2.5rem; font-size: .93rem; }
.pied a { color: #fff; }
.pied__grille { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; }
.pied__nom { font: 600 1.15rem var(--serif); color: #fff; }
.pied__titre { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: #9a9a9a; margin: 0 0 .5rem; }
.logos { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.2rem; }
.logos a { background: #fff; border-radius: 10px; padding: .45rem .7rem; display: block; }
.logos img { height: 40px; width: auto; }

@media (max-width: 860px) {
  .une__grille, .fiche__grille, .pied__grille { grid-template-columns: 1fr; }
  .une__logo { width: 200px; order: -1; }
  .encart { position: static; }
}

@media (max-width: 560px) {
  .marque span { font-size: .82rem; }
  .nav a { padding: .4rem .6rem; font-size: .88rem; }
  .chiffres { grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
  .chiffres div { padding: .8rem; }
  .profils { grid-template-columns: 1fr; }
  .suite { flex-direction: column; }
  .suite a { max-width: none; }
  .suite a:last-child { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .carte { transition: none; }
  .carte:hover { transform: none; }
}
