/* evolutive-formation.fr : l'emploi du temps (23 octobre 2026). Papier quadrillé clair, une couleur par matière. */
:root {
  --papier: #fdfcf7;
  --quadrillage: #e3ebf5;
  --encre: #22262e;
  --gris: #5b616c;
  --trait: #dfe3ea;
  --blanc: #ffffff;
  --m-formation: #3a63b8;
  --m-ecoles: #2f7d5b;
  --m-metiers: #e07a2e;
  --m-ecrire: #8a4fb0;
  --m-proprete: #1f9aa8;
  --m-entreprise: #b8433f;
  --titre: 'Livvic', 'Segoe UI', sans-serif;
  --texte: 'Radio Canada', 'Segoe UI', sans-serif;
  --etroite: 'Sofia Sans Condensed', 'Arial Narrow', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--encre); font: 400 17.5px/1.65 var(--texte); background-color: var(--papier); background-image: linear-gradient(var(--quadrillage) 1px, transparent 1px), linear-gradient(90deg, var(--quadrillage) 1px, transparent 1px); background-size: 26px 26px; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.saut { position: absolute; left: -999px; }
.saut:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 9; }

.matiere--formation, .colonne--formation, .lecon--formation, .carte--formation, .copie--formation, .titre-matiere--formation { --m: var(--m-formation); }
.matiere--ecoles, .colonne--ecoles, .lecon--ecoles, .carte--ecoles, .copie--ecoles, .titre-matiere--ecoles { --m: var(--m-ecoles); }
.matiere--metiers, .colonne--metiers, .lecon--metiers, .carte--metiers, .copie--metiers, .titre-matiere--metiers { --m: var(--m-metiers); }
.matiere--ecrire, .colonne--ecrire, .lecon--ecrire, .carte--ecrire, .copie--ecrire, .titre-matiere--ecrire { --m: var(--m-ecrire); }
.matiere--proprete, .colonne--proprete, .lecon--proprete, .carte--proprete, .copie--proprete, .titre-matiere--proprete { --m: var(--m-proprete); }
.matiere--entreprise, .colonne--entreprise, .lecon--entreprise, .carte--entreprise, .copie--entreprise, .titre-matiere--entreprise { --m: var(--m-entreprise); }

/* --- l'en-tête : étiquette de cahier et matières */
.cartable { background: var(--blanc); border-bottom: 1px solid var(--trait); box-shadow: 0 2px 0 rgba(34, 38, 46, .04); }
.cartable__in { max-width: 1200px; margin: 0 auto; padding: 20px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 30px; }
.etiquette { display: inline-flex; flex-direction: column; text-decoration: none; border: 2px solid var(--encre); border-radius: 10px; padding: 10px 18px 9px; background: var(--blanc); box-shadow: 4px 4px 0 var(--m-ecoles); }
.etiquette__nom { font: 500 30px/1.05 var(--titre); letter-spacing: -.01em; margin: 0; }
.etiquette__nom b { font-weight: 700; color: var(--m-ecoles); }
.etiquette__ligne { font: 700 13px/1 var(--etroite); text-transform: uppercase; letter-spacing: .16em; color: var(--gris); margin-top: 6px; }
.matieres { display: flex; flex-wrap: wrap; gap: 8px; }
.matiere { display: inline-block; padding: 8px 16px; border-radius: 999px; background: color-mix(in srgb, var(--m) 12%, white); color: var(--m); border: 1.5px solid color-mix(in srgb, var(--m) 40%, white); font: 700 16px/1.2 var(--etroite); letter-spacing: .02em; text-decoration: none; }
.matiere:hover, .matiere[aria-current] { background: var(--m); color: #fff; border-color: var(--m); }

main { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-t { font: 700 28px/1.2 var(--titre); margin: 0 0 18px; }

/* --- la rentrée */
.rentree { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 34px; padding: 34px 0 30px; align-items: center; }
.rentree > * { min-width: 0; }
.rentree__mot { background: var(--blanc); border: 1px solid var(--trait); border-left: 6px solid var(--m-ecoles); border-radius: 8px; padding: 24px 26px; }
.rentree__sur { font: 700 14px/1 var(--etroite); text-transform: uppercase; letter-spacing: .14em; color: var(--m-ecoles); margin: 0 0 12px; }
.rentree__mot h1 { font: 700 clamp(23px, 2.4vw, 29px)/1.25 var(--titre); margin: 0 0 12px; }
.rentree__mot p:last-child { color: var(--gris); margin: 0; }
.phare { position: relative; display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.phare__badge { position: absolute; top: 14px; left: 14px; z-index: 1; background: #ffd84a; color: var(--encre); font: 700 14px/1 var(--etroite); text-transform: uppercase; letter-spacing: .08em; padding: 8px 12px; border-radius: 4px; transform: rotate(-2deg); }
.phare__t { font: 700 clamp(23px, 2.5vw, 30px)/1.2 var(--titre); }
.phare:hover .phare__t { color: var(--m-ecoles); }
.carte__img, .lecon__img { display: block; overflow: hidden; border-radius: 8px; background: var(--quadrillage); }
.carte__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s; }
a:hover .carte__img img { transform: scale(1.03); }
.lecon__m { font: 700 14px/1 var(--etroite); text-transform: uppercase; letter-spacing: .1em; color: var(--m, var(--gris)); }
.lecon__d { font: 500 14px/1.3 var(--etroite); color: var(--gris); }

/* --- l'emploi du temps */
.programme { padding: 10px 0 30px; }
.grille { display: grid; grid-template-columns: 70px repeat(var(--n), minmax(0, 1fr)); gap: 0; background: var(--blanc); border: 2px solid var(--encre); border-radius: 10px; overflow: hidden; }
.grille__heures { display: grid; grid-template-rows: 54px repeat(3, minmax(110px, auto)); border-right: 1px solid var(--trait); background: #f4f6fa; }
.grille__heures span { font: 700 15px/1 var(--etroite); color: var(--gris); padding: 12px 8px; border-top: 1px solid var(--trait); }
.grille__heures span:first-child { border-top: 0; }
.colonne { display: grid; grid-template-rows: 54px auto; border-left: 1px solid var(--trait); min-width: 0; }
.colonne:nth-child(2) { border-left: 0; }
.colonne h3 { margin: 0; display: flex; align-items: center; justify-content: center; background: var(--m); color: #fff; font: 700 19px/1 var(--titre); }
.colonne h3 a { text-decoration: none; }
.colonne ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-rows: repeat(3, minmax(110px, auto)); }
.colonne li { border-top: 1px solid var(--trait); }
.colonne li:first-child { border-top: 0; }
.colonne li a { display: block; height: 100%; padding: 12px 14px; text-decoration: none; font-weight: 600; font-size: 15.5px; line-height: 1.32; overflow-wrap: anywhere; border-left: 4px solid transparent; }
.colonne li a:hover { background: color-mix(in srgb, var(--m) 8%, white); border-left-color: var(--m); }
.creneau { display: none; font: 700 13px/1 var(--etroite); color: var(--m); margin-bottom: 6px; }

/* --- derniers cours */
.derniers { padding: 10px 0 40px; }
.lecons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
.lecon { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px; background: var(--blanc); border: 1px solid var(--trait); border-top: 4px solid var(--m); border-radius: 8px; text-decoration: none; height: 100%; }
.lecon__img img { width: 170px; height: 106px; object-fit: cover; }
.lecon__c { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lecon__t { font: 700 17.5px/1.3 var(--titre); overflow-wrap: anywhere; }
.lecon:hover .lecon__t { color: var(--m); }
.cartes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.carte { display: flex; flex-direction: column; gap: 8px; text-decoration: none; height: 100%; background: var(--blanc); border: 1px solid var(--trait); border-radius: 8px; padding: 10px 10px 14px; }
.carte__t { font: 700 18px/1.3 var(--titre); overflow-wrap: anywhere; }
.carte:hover .carte__t { color: var(--m); }

/* --- rubrique */
.titre-matiere { margin: 34px 0 26px; padding: 22px 26px; background: var(--blanc); border: 2px solid var(--encre); border-left: 12px solid var(--m, var(--encre)); border-radius: 10px; }
.titre-matiere h1 { font: 700 clamp(30px, 4vw, 44px)/1.1 var(--titre); margin: 0 0 6px; color: var(--m, var(--encre)); }
.titre-matiere p { margin: 0; color: var(--gris); max-width: 760px; }

/* --- article : la copie */
.copie { max-width: 800px; margin: 30px auto 10px; padding: 34px 40px 30px; background: var(--blanc); border: 1px solid var(--trait); border-left: 3px solid #e8a3a3; border-radius: 4px; box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.copie__tete h1 { font: 700 clamp(28px, 3.4vw, 40px)/1.18 var(--titre); margin: 16px 0 12px; overflow-wrap: anywhere; }
.copie__meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font: 500 15px/1.4 var(--etroite); color: var(--gris); margin: 0 0 22px; }
.copie__img { margin: 0 0 26px; }
.copie__img img { border-radius: 6px; }
.texte { overflow-wrap: anywhere; }
.texte h2 { font: 700 26px/1.25 var(--titre); margin: 1.7em 0 .5em; color: var(--m, var(--encre)); }
.texte h3 { font: 700 20px/1.3 var(--titre); margin: 1.4em 0 .4em; }
.texte a { color: #2b55a8; text-underline-offset: 3px; }
.texte a:hover { color: var(--m-entreprise); }
.texte img { border-radius: 6px; margin: 1em 0; }
.texte blockquote { margin: 1.4em 0; padding: 12px 18px; background: #fff8d9; border-left: 4px solid #e6c34a; }
.texte table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 16px; display: block; overflow-x: auto; }
.texte th, .texte td { border: 1px solid var(--trait); padding: 8px 10px; text-align: left; vertical-align: top; }
.texte th { background: #f4f6fa; }

/* --- formulaire */
.formulaire { margin-top: 26px; background: #f4f6fa; border-radius: 8px; padding: 20px 22px; }
.formulaire label { display: block; font-weight: 600; margin-bottom: 4px; }
.formulaire input, .formulaire textarea { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid #c3cad6; border-radius: 4px; background: #fff; }
.formulaire button { font: 700 17px/1 var(--titre); background: var(--m-ecoles); color: #fff; border: 0; border-radius: 6px; padding: 13px 22px; cursor: pointer; }
.formulaire button:hover { background: var(--m-formation); }
.formulaire__ok { background: #e3f3ea; padding: 10px 14px; border-radius: 4px; }
.formulaire__piege { position: absolute; left: -9999px; }

/* --- le carnet de correspondance */
.correspondance { margin-top: 30px; background: var(--blanc); border-top: 2px solid var(--encre); }
.correspondance__in { max-width: 1200px; margin: 0 auto; padding: 32px 24px 16px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.correspondance__in > * { min-width: 0; }
.correspondance__nom p:last-child { color: var(--gris); max-width: 380px; }
.correspondance__t { font: 700 14px/1 var(--etroite); text-transform: uppercase; letter-spacing: .14em; color: var(--gris); margin: 6px 0 12px; }
.correspondance ul { list-style: none; margin: 0; padding: 0; }
.correspondance__matieres { display: flex; flex-wrap: wrap; gap: 8px; }
.correspondance__pages li { margin: 0 0 8px; }
.correspondance__pages a { text-decoration: none; }
.correspondance__pages a:hover { text-decoration: underline; }
.correspondance__avis { max-width: 1200px; margin: 0 auto; padding: 14px 24px 26px; font-size: 15px; color: var(--gris); border-top: 1px dashed var(--trait); }

@media (max-width: 1000px) {
  .rentree { grid-template-columns: minmax(0, 1fr); }
  .grille { grid-template-columns: minmax(0, 1fr); }
  .grille__heures { display: none; }
  .colonne { border-left: 0; border-top: 2px solid var(--encre); grid-template-rows: 48px auto; }
  .colonne:nth-child(2) { border-top: 0; }
  .colonne ol { grid-template-rows: none; }
  .creneau { display: block; }
  .lecons { grid-template-columns: minmax(0, 1fr); }
  .cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .correspondance__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .correspondance__nom { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .cartable__in, main, .correspondance__in, .correspondance__avis { padding-left: 16px; padding-right: 16px; }
  .etiquette__nom { font-size: 26px; }
  .matiere { padding: 7px 12px; font-size: 15px; }
  .lecon { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; }
  .lecon__img img { width: 104px; height: 72px; }
  .cartes { grid-template-columns: minmax(0, 1fr); }
  .copie { padding: 22px 16px; margin-top: 18px; }
  .correspondance__in { grid-template-columns: minmax(0, 1fr); }
}
