/* ==========================================================
   Lycée Edgar Quinet — Maquette
   Livrets (à télécharger) et parcours (à consulter en ligne).
   S'appuie sur les variables de style.css.
   Code couleur : jaune = livret PDF, bleu = contenu en ligne.
   ========================================================== */

/* Sections de contenu placées sous la grille de cartes */
.section + .section {
  padding-top: 0;
}

/* ---------- Cartes « livret » ---------- */
.card-download {
  border-top-color: var(--yellow);
}

.card-download .card-link::before {
  content: "PDF";
  display: inline-block;
  margin-right: 8px;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--yellow);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
  vertical-align: 1px;
}

/* ---------- Groupes (livret / parcours) ---------- */
.group {
  margin-bottom: 44px;
  scroll-margin-top: 110px;
}

.group:last-child {
  margin-bottom: 0;
}

.group-head {
  margin-bottom: 18px;
}

.group-head h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--blue-dark);
  line-height: 1.25;
}

.tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tag-download {
  background: var(--yellow);
  color: var(--text);
}

.tag-download::before {
  content: "↓ ";
}

/* Bloc livret : fond jaune clair, bordure jaune */
.group-download {
  background: #fffbe0;
  border: 1px solid #f3e39a;
  border-top: 5px solid var(--yellow);
  border-radius: var(--radius);
  padding: 28px 32px 32px;
}

/* ---------- Téléchargements ---------- */
.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
  gap: 20px;
}

.download {
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.download img {
  flex: none;
  width: 120px;
  height: auto;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  background: var(--white);
}

.download h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 1rem;
}

.download-meta {
  font-size: 0.84rem;
  color: var(--text-light);
  margin-bottom: 14px;
}

.download .btn-primary {
  padding: 9px 20px;
  font-size: 0.88rem;
  margin-right: 12px;
}

.download .btn-primary::before {
  content: "↓ ";
}

.download a:not(.btn-primary) {
  font-size: 0.88rem;
  font-weight: 700;
}

/* ---------- Bloc de contenu en ligne (un livrable) ---------- */
.doc {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 4px solid var(--blue);
  padding: 32px;
  margin-bottom: 24px;
  scroll-margin-top: 110px;
}

.doc:last-child {
  margin-bottom: 0;
}

.doc h3 {
  font-size: 1.3rem;
  color: var(--blue-dark);
  line-height: 1.3;
  margin-bottom: 18px;
}

.doc h4 {
  font-size: 1.02rem;
  color: var(--blue);
  margin: 28px 0 12px;
}

.doc h3 + h4 {
  margin-top: 0;
}

.doc p {
  margin-bottom: 12px;
}

.doc-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 4px !important;
}

.doc-sub {
  color: var(--text-light);
  font-weight: 600;
  margin: 4px 0 0 !important;
}

/* ---------- Blocs repliables ---------- */
details.doc > summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding-right: 44px;
}

details.doc > summary::-webkit-details-marker {
  display: none;
}

details.doc > summary h3 {
  margin-bottom: 0;
}

details.doc > summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-right: 3px solid var(--blue);
  border-bottom: 3px solid var(--blue);
  transform: translateY(-75%) rotate(45deg);
  transition: transform 0.15s ease;
}

details.doc[open] > summary::after {
  transform: translateY(-25%) rotate(-135deg);
}

details.doc > summary:hover h3 {
  color: var(--blue);
}

details.doc[open] > summary {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e5e5e5;
}

/* ---------- Tableaux ---------- */
.table-scroll {
  overflow-x: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  border: 1px solid #e3e3e3;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 560px;
}

.doc th {
  background: var(--blue);
  color: var(--white);
  text-align: left;
  font-weight: 700;
  padding: 10px 14px;
  vertical-align: bottom;
}

.doc th strong {
  font-weight: inherit;
}

.doc td {
  padding: 10px 14px;
  border-top: 1px solid #e8e8e8;
  vertical-align: top;
}

.doc tbody tr:nth-child(even) td {
  background: #f7fafd;
}

.doc td ul {
  margin: 0 0 0 18px;
}

.doc td li + li {
  margin-top: 4px;
}

.doc td.center {
  text-align: center;
  font-size: 1.15rem;
  line-height: 1.2;
}

/* ---------- Questionnaire ---------- */
.doc .question {
  font-size: 0.98rem;
  color: var(--text);
  margin: 24px 0 10px;
}

.options {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 8px;
}

.options li {
  background: var(--blue-light);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.9rem;
}

/* ---------- Lignes à compléter ---------- */
.answer {
  display: inline-block;
  min-width: 160px;
  height: 1.1em;
  border-bottom: 2px dotted #9a9a9a;
  vertical-align: baseline;
}

.answer.block {
  display: block;
  width: 100%;
  height: 2.2em;
  margin-top: 4px;
}

/* ---------- Grille d'entretien ---------- */
.interview {
  margin: 0 0 8px 20px;
}

.interview li {
  margin-bottom: 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .group,
  .doc {
    scroll-margin-top: 200px;
  }

  .group-download {
    padding: 22px 16px;
  }

  .doc {
    padding: 22px 18px;
  }

  .download {
    align-items: flex-start;
  }

  .download img {
    width: 84px;
  }
}
