/* ═══════════════════════════════════════
   OpenPeace — atelier.css
   Composants des pages d'atelier (mois + niveaux).
   Chargé UNIQUEMENT par ateliers/**, archives.html et ressources.html.
   style.css reste la base commune à tout le site.
   Charte fusionnee AAEE x OpenPeace - adoptee le 25/09/2026
═══════════════════════════════════════ */

/* ── FIL D'ARIANE ── */
.fil {
  max-width: 820px;
  margin: 1.2rem auto 0;
  padding: 0 1.5rem;
  font-size: 0.85rem;
  color: var(--gris);
}
.fil a {
  color: var(--rose-dark);
  font-weight: 700;
  text-decoration: none;
}
.fil a:hover { text-decoration: underline; }

/* ── HERO D'ATELIER ── */
/* Le rouge brique cite le bloc « À la une » du site de l'association.
   Pas de filet dessous : l'aplat s'arrête net sur le crème. */
.at-hero {
  background: var(--brique);
  padding: 2.5rem 1.5rem 2rem;
}
.at-hero-inner { max-width: 820px; margin: 0 auto; }
.badge-date {
  display: inline-block;
  background: rgba(255,255,255,0.16);
  color: var(--or-pale);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  border: 1px solid rgba(246,230,188,0.4);
  margin-bottom: 0.85rem;
}
.at-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--blanc);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}
.at-hero h1 span { color: var(--rose); }
.at-hero .objectif {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  max-width: 580px;
  line-height: 1.65;
}

/* ── CONTENU ── */
.contenu {
  max-width: 820px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.sections-titre {
  font-size: 1rem;
  font-weight: 700;
  color: var(--noir);
  margin-bottom: 1rem;
  padding-left: 0.75rem;
  border-left: 4px solid var(--filet);
}

/* ═══ LES NIVEAUX DU MOIS ═══
   Utilisé sur la page index.html d'un mois. */
.niveaux { display: flex; flex-direction: column; gap: 0.8rem; }

.niveau-carte {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 1.1rem 1.3rem;
  background: var(--blanc);
  border: 1.5px solid var(--bord);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.niveau-carte:hover {
  border-color: var(--rose-dark);
  box-shadow: 0 3px 14px rgba(233,30,140,0.12);
  transform: translateX(3px);
}

.niveau-num {
  flex-shrink: 0;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--rose);
  color: var(--noir);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 800;
}

.niveau-corps { flex: 1; min-width: 0; }
/* Ce sont des <span> dans un <a> : sans ceci ils se suivraient sur une ligne. */
.niveau-titre, .niveau-desc, .niveau-meta { display: block; }
.niveau-titre {
  font-size: 1rem;
  font-weight: 800;
  color: var(--noir);
  margin-bottom: 0.15rem;
}
.niveau-desc {
  font-size: 0.87rem;
  color: var(--gris);
  line-height: 1.6;
}
.niveau-meta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rose-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.45rem;
}
.niveau-fleche {
  flex-shrink: 0;
  align-self: center;
  color: var(--rose-dark);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Niveau pas encore travaillé en séance : présent, mais en retrait.
   Se met sur un <div> (pas un <a>) tant qu'il n'y a pas de page. */
.niveau-carte.avenir {
  border-style: dashed;
  background: transparent;
  opacity: 0.75;
}
.niveau-carte.avenir:hover {
  border-color: var(--bord);
  box-shadow: none;
  transform: none;
}
.niveau-carte.avenir .niveau-num {
  background: transparent;
  border: 1.5px dashed var(--rose-bord);
  color: var(--rose-dark);
}
.niveau-carte.avenir .niveau-meta { color: var(--gris-light); }

/* ═══ TÉLÉCHARGEMENTS ═══
   Bloc mis EN HAUT de chaque page de niveau : le PDF est le support
   de la séance, la page sert surtout à le retrouver et le réimprimer. */
.telecharger {
  background: var(--rose-pale);
  border: 1.5px solid var(--rose);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}
.telecharger h2 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--noir);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.telecharger .telecharger-intro {
  font-size: 0.86rem;
  color: var(--gris);
  line-height: 1.6;
  margin-bottom: 0.9rem;
}
.dl-liste { display: flex; flex-direction: column; gap: 0.6rem; }

.dl-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--blanc);
  border-radius: 10px;
  border: 1.5px solid var(--bord);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.dl-item:hover {
  border-color: var(--rose-dark);
  box-shadow: 0 3px 14px rgba(233,30,140,0.12);
  transform: translateX(3px);
}
.dl-picto { font-size: 1.6rem; flex-shrink: 0; width: 2.2rem; text-align: center; }
.dl-infos { flex: 1; min-width: 0; }
.dl-nom { font-size: 0.9rem; font-weight: 700; color: var(--noir); }
.dl-desc { font-size: 0.8rem; color: var(--gris); margin-top: 0.1rem; }
.dl-badge {
  font-size: 0.7rem; font-weight: 800; padding: 0.18rem 0.55rem;
  border-radius: 20px; flex-shrink: 0; text-transform: uppercase;
  letter-spacing: 0.05em; background: #FBF1DC; color: #8A4A12;
}
.dl-badge.pdf { background: #FBEDEC; color: var(--brique); }
.dl-badge.zip { background: #FBF1DC; color: #8A4A12; }
.dl-badge.doc { background: #E7F0F5; color: #2C6A8F; }
.dl-btn {
  font-size: 0.78rem; font-weight: 700; color: var(--rose-dark);
  border: 1.5px solid var(--rose-dark); padding: 0.3rem 0.7rem;
  border-radius: 20px; white-space: nowrap; flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.dl-item:hover .dl-btn { background: var(--rose-dark); color: white; }

/* ── À RETENIR ── */
.a-retenir {
  background: var(--rose-pale);
  border-left: 4px solid black;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
}
.a-retenir h2 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--noir);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.a-retenir ul {
  list-style: disc;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.a-retenir ul li { font-size: 0.9rem; color: var(--noir); line-height: 1.55; }

/* ── SECTIONS PÉDAGOGIQUES ── */
.lecon { display: flex; flex-direction: column; gap: 1.1rem; }
.lecon-item {
  background: var(--blanc);
  border: 1.5px solid var(--bord);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
}
.lecon-item h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--noir);
  margin-bottom: 0.4rem;
}
.lecon-item p { font-size: 0.9rem; color: var(--gris); line-height: 1.65; }
.lecon-item p + p { margin-top: 0.7rem; }
.lecon-item.optionnel { border-style: dashed; }

/* ── CHEMIN DANS LES MENUS ── */
.chemin-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rose-dark);
  margin: 0.9rem 0 0.45rem;
}
.chemin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}
.chemin span {
  display: inline-block;
  background: var(--noir);
  color: var(--blanc);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border-bottom: 2px solid var(--rose-dark);
}
.chemin i {
  color: var(--rose-dark);
  font-style: normal;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ── ÉTAPES NUMÉROTÉES ── */
.etapes {
  list-style: none;
  counter-reset: etape;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0.9rem 0 0.2rem;
}
.etapes li {
  counter-increment: etape;
  position: relative;
  padding-left: 2.2rem;
  font-size: 0.9rem;
  color: var(--gris);
  line-height: 1.6;
}
.etapes li::before {
  content: counter(etape);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.55rem;
  height: 1.55rem;
  background: var(--rose);
  color: var(--noir);
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── ENCADRÉ VIGILANCE ── */
.vigilance {
  background: #FFF6FA;
  border: 1.5px dashed var(--rose-dark);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin-top: 1rem;
  font-size: 0.86rem;
  color: var(--noir);
  line-height: 1.6;
}
.vigilance strong { color: var(--rose-dark); }

/* ── CARTES (grille) ── */
.outils-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
  margin: 0.9rem 0 0.3rem;
}
.outil-carte {
  background: var(--rose-pale);
  border: 1.5px solid var(--rose);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}
.outil-carte .outil-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.4rem;
  background: var(--noir);
  color: var(--blanc);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.outil-carte h4 {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--noir);
  margin-bottom: 0.2rem;
}
.outil-carte p { font-size: 0.83rem; color: var(--gris); line-height: 1.55; }

/* ── CONCLUSION ── */
.conclusion {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rose-dark);
  padding: 0.5rem 1rem 1rem;
}

/* ═══ BIBLIOTHÈQUE (archives.html) ═══ */
.biblio { max-width: 820px; margin: 2.5rem auto; padding: 0 1.5rem; display: flex; flex-direction: column; gap: 2.2rem; }
.biblio-mois {
  background: var(--blanc);
  border: 1.5px solid var(--bord);
  border-radius: var(--radius);
  overflow: hidden;
}
.biblio-entete {
  background: var(--noir);
  padding: 1rem 1.3rem;
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  flex-wrap: wrap;
  text-decoration: none;
}
.biblio-periode {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rose);
}
.biblio-theme { font-size: 1.05rem; font-weight: 800; color: var(--blanc); }
.biblio-liste { display: flex; flex-direction: column; }
.biblio-liste a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1.3rem;
  border-top: 1px solid var(--bord);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.biblio-liste a:hover { background: var(--rose-pale); }
.biblio-niv {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rose-dark);
  width: 4.5rem;
}
.biblio-titre { flex: 1; font-size: 0.92rem; font-weight: 700; color: var(--noir); }
.biblio-date { flex-shrink: 0; font-size: 0.78rem; color: var(--gris-light); }

@media (max-width: 560px) {
  .biblio-niv { width: auto; }
  .biblio-date { display: none; }
}

/* ═══ LE RYTHME ═══
   Encadré rassurant : « rien à finir aujourd'hui ». Introduit en septembre 2026
   après le trombinoscope, pour dire noir sur blanc qu'on n'est pas à la course. */
.rythme {
  background: var(--blanc);
  border: 2px solid var(--rose);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}
.rythme .rythme-picto { font-size: 1.8rem; line-height: 1; flex-shrink: 0; }
.rythme h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--noir);
  margin-bottom: 0.4rem;
}
.rythme p { font-size: 0.92rem; color: var(--gris); line-height: 1.7; }
.rythme p + p { margin-top: 0.6rem; }
.rythme strong { color: var(--noir); }

/* ═══ TEXTE SOURCE À COPIER ═══
   Le compagnon colle ce texte dans son document plutôt que de le retaper. */
.texte-source {
  border: 1.5px solid var(--bord);
  border-radius: var(--radius);
  background: var(--blanc);
  overflow: hidden;
}
.texte-source-entete {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.2rem;
  background: var(--rose-pale);
  border-bottom: 1.5px solid var(--rose);
}
.texte-source-entete h3 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--noir);
  flex: 1;
  min-width: 12rem;
}
.btn-copier {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: white;
  background: var(--rose-dark);
  border: 1.5px solid var(--rose-dark);
  padding: 0.45rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.btn-copier:hover { transform: translateY(-1px); }
.btn-copier.ok { background: var(--vert); border-color: var(--vert); }
.btn-copier.rate { background: var(--noir); border-color: var(--noir); }

.texte-source-corps {
  margin: 0;
  padding: 1.1rem 1.2rem;
  font-family: 'Segoe UI', Calibri, sans-serif;
  font-size: 0.87rem;
  line-height: 1.75;
  color: var(--gris);
  word-wrap: break-word;
  max-height: 16rem;
  overflow-y: auto;
}
.texte-source-aide {
  font-size: 0.8rem;
  color: var(--gris);
  font-style: italic;
  padding: 0.75rem 1.2rem;
  border-top: 1px dashed var(--rose-bord);
  background: #FFF8FB;
}
/* Les repères (1), (2°)… du texte source, mis en évidence */
.texte-source-corps mark {
  background: var(--rose);
  color: var(--noir);
  font-weight: 700;
  border-radius: 3px;
  padding: 0 0.15rem;
}

/* ═══ QUESTION À TIROIR ═══
   On pose la question, la réponse reste cachée tant qu'on ne clique pas. */
.question {
  background: #FFF6FA;
  border: 1.5px solid var(--rose-bord);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-top: 1rem;
}
.question h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--noir);
  margin-bottom: 0.4rem;
}
.question > p { font-size: 0.9rem; color: var(--gris); line-height: 1.65; }
.question details { margin-top: 0.9rem; }
.question summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rose-dark);
  list-style: none;
  display: inline-block;
  border: 1.5px solid var(--rose-dark);
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
}
.question summary::-webkit-details-marker { display: none; }
.question summary:hover { background: var(--rose-dark); color: white; }
.question details[open] summary { margin-bottom: 0.8rem; }
.question details p { font-size: 0.88rem; color: var(--gris); line-height: 1.7; }
.question details p + p { margin-top: 0.6rem; }
.question details strong { color: var(--noir); }

/* ═══ QUIZ COLLECTIF (Kahoot) ═══ */
.kahoot {
  background: var(--noir);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  border: 2px solid var(--rose);
}
.kahoot h2 { font-size: 1.1rem; font-weight: 800; color: var(--blanc); margin-bottom: 0.4rem; }
.kahoot h2 span { color: var(--rose); }
.kahoot p { font-size: 0.9rem; color: #bbb; line-height: 1.65; max-width: 460px; margin: 0 auto 1.1rem; }
.kahoot .btn-kahoot {
  display: inline-block;
  background: var(--rose);
  color: var(--noir);
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
  padding: 0.7rem 2rem;
  border-radius: 30px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.kahoot .btn-kahoot:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,188,216,0.3); }
.kahoot .kahoot-aide { font-size: 0.8rem; color: var(--gris-light); margin: 0.9rem auto 0; }

/* ── APERÇU D'IMAGE (fichiers à télécharger qui sont des images) ── */
.dl-item .dl-apercu {
  width: 2.6rem;
  height: 2.6rem;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--fond);
  border-radius: 6px;
}
.dl-badge.img { background: #EFF5E8; color: var(--vert); }

/* ── TÉLÉCHARGEMENTS SUR PETIT ÉCRAN ──
   En dessous de 520px la ligne est trop serrée : on empile le badge et le
   bouton sous le nom du fichier plutôt que de tout comprimer. */
@media (max-width: 520px) {
  .dl-item {
    flex-wrap: wrap;
    gap: 0.6rem 0.8rem;
  }
  /* le nom prend tout ce qui reste de la 1re ligne : badge et bouton
     passent donc systématiquement à la ligne suivante, tous pareils. */
  .dl-infos { flex: 1 1 calc(100% - 3.9rem); }
  .dl-badge { order: 3; }
  .dl-btn { order: 4; margin-left: auto; }
  .texte-source-entete h3 { min-width: 0; }
  .btn-copier { width: 100%; }
}
