/* TEMPLATE — PRÉSIDENTIELLE 2027 */

.tpl-presidentielle-2027 {
  color: var(--text);
  /* Gouttière de la maquette : colonnes de 63px, gouttière de 12px. */
  --grid-18-gutter: 12px;
}

.tpl-presidentielle-2027 .grid-18 {
  --grid-18-row-gap: var(--spacer);
}

@media screen and (min-width: 768px) {
  .tpl-presidentielle-2027 .grid-18 {
    --grid-18-row-gap: 0;
  }
}

.tpl-presidentielle-2027 .grid-18.align-items-center > * {
  align-self: center;
}

.tpl-presidentielle-2027 section {
  padding-block: var(--spacer-xl);
}

@media screen and (min-width: 1200px) {
  .tpl-presidentielle-2027 section {
    padding-block: 50px;
  }
}

/* --- Corps de texte — Crimson Pro Regular 15/22, #373737 --- */
.tpl-presidentielle-2027 .wysiwyg,
.tpl-presidentielle-2027 .wysiwyg p,
.tpl-presidentielle-2027 .wysiwyg li {
  font-family: var(--font-family-serif), serif;
  font-size: 15px;
  line-height: 22px;
  color: #373737;
}

.tpl-presidentielle-2027 .wysiwyg ul {
  padding-inline-start: 22px;
  margin-block: var(--spacer);
}
.tpl-presidentielle-2027 .wysiwyg ul:last-child {
  margin-block-end: 0;
}

.tpl-presidentielle-2027 .wysiwyg ul li {
  margin-block-end: 0;
}

.tpl-presidentielle-2027 .wysiwyg ul li::before {
  content: '•';
  color: var(--text);
  width: 0;
  height: 0;
  top: 0;
  left: -20px;
}

/* Sous-titres internes aux sections (« Les plafonds de dépenses »...) :
   H3 Crimson Pro Bold 24/30, sans filet. */
.tpl-presidentielle-2027 .wysiwyg h3 {
  font-family: var(--font-family-serif), serif;
  font-weight: var(--font-weight-title);
  font-size: 24px;
  line-height: 30px;
  color: #191919;
  margin-block: var(--spacer-xl) 15px;
}

.tpl-presidentielle-2027 .wysiwyg > *:first-child {
  margin-block-start: 0;
}

/* --- 1. Intro --- */
/* H1 Figtree Bold 40/48 */
.tpl-presidentielle-2027 .col-title .title {
  font-family: var(--font-family-sans-serif), sans-serif;
  font-weight: var(--font-weight-title);
  font-size: 28px;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: var(--spacer);
}

@media screen and (min-width: 1200px) {
  .tpl-presidentielle-2027 .col-title .title {
    font-size: 40px;
    line-height: 48px;
  }
}

/* --- Titre de section — Figtree Bold 28/33 + filet 47px --- */
.tpl-presidentielle-2027 .section-title {
  font-family: var(--font-family-sans-serif), sans-serif;
  font-weight: var(--font-weight-title);
  font-size: 28px;
  line-height: 33px;
  color: var(--text);
  margin-bottom: 0;
}

.tpl-presidentielle-2027 .section-title::after {
  content: "";
  display: block;
  width: 47px;
  height: 2px;
  background: var(--primary);
  margin-top: 20px;
  margin-bottom: 40px;
}

/* --- 2. Dates clés --- */
.tpl-presidentielle-2027 .col-key-dates .key-dates-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tpl-presidentielle-2027 .col-key-dates .key-date {
  --grid-18-row-gap: 5px;
  padding-block: 10px;
  padding-inline: 0;
}

@media screen and (min-width: 768px) {
  .tpl-presidentielle-2027 .col-key-dates .key-date {
    --grid-18-row-gap: 0;
    padding-block: 5px;
  }
}

.tpl-presidentielle-2027 .col-key-dates .key-date::after {
  content: none;
}

/* Tiret de 42px devant la date, puis la date, puis un filet vertical.
   Sur mobile on ne garde que la date. */
.tpl-presidentielle-2027 .col-key-dates .date-label {
  display: flex;
  align-items: center;
  gap: 26px;
}

.tpl-presidentielle-2027 .col-key-dates .date-label::before {
  content: "";
  flex: 0 0 42px;
  height: 1px;
  background: var(--text);
}

.tpl-presidentielle-2027 .col-key-dates .date-value {
  flex: 1 0 0;
  font-family: var(--font-family-serif), serif;
  font-weight: var(--font-weight-title);
  font-size: 24px;
  line-height: 30px;
  color: #191919;
  font-style: normal;
}

@media screen and (min-width: 768px) {
  .tpl-presidentielle-2027 .col-key-dates .date-label::after {
    content: "";
    flex: 0 0 1px;
    align-self: center;
    height: 29px;
    background: var(--primary);
  }
}

.tpl-presidentielle-2027 .col-key-dates .date-description {
  font-family: var(--font-family-serif), serif;
  font-size: 15px;
  line-height: 22px;
  color: #373737;
  font-weight: normal;
  font-style: normal;
}

@media screen and (min-width: 768px) {
  .tpl-presidentielle-2027 .col-key-dates .date-description {
    padding-inline-start: 15px;
  }
}

/* --- 3. Sections image + texte --- */
.tpl-presidentielle-2027 .col-section .section-media img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius);
}

@media screen and (min-width: 768px) {
  .tpl-presidentielle-2027 .col-section .section-media img {
    height: 446px;
  }
}

/* --- 4. Ressources à télécharger --- */
.tpl-presidentielle-2027 .col-resources .resources-box {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: var(--spacer-xl) var(--spacer);
}

@media screen and (min-width: 1200px) {
  .tpl-presidentielle-2027 .col-resources .resources-box {
    padding: 100px;
  }
}

/* Titre du bloc ressources : Figtree Medium 24/28, bleu profond, capitales.
   Volontairement différent des autres titres de section (cf. maquette). */
.tpl-presidentielle-2027 .col-resources .resources-title {
  font-family: var(--font-family-sans-serif), sans-serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 28px;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 0;
}

.tpl-presidentielle-2027 .col-resources .resources-title::after {
  content: "";
  display: block;
  width: 47px;
  height: 2px;
  background: var(--primary);
  margin-top: 20px;
  margin-bottom: 80px;
}

/* Lignes de documents — markup imposé par download-all.js (.form-check[data-id]) */
.tpl-presidentielle-2027 .col-resources .form-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 36px;
  margin: 0 0 20px;
  padding: 0 40px 10px 0;
  border-bottom: 1px solid var(--primary-dark);
}

.tpl-presidentielle-2027 .col-resources .form-check:last-child {
  margin-bottom: 0;
}

.tpl-presidentielle-2027 .col-resources .form-check-input {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin: 5px 0 0;
  border-radius: 0;
  border: 1px solid var(--text);
  background-color: transparent;
}

.tpl-presidentielle-2027 .col-resources .form-check-input:checked {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.tpl-presidentielle-2027 .col-resources .form-check-label {
  flex: 1 0 0;
  font-family: var(--font-family-serif), serif;
  font-size: 15px;
  line-height: 22px;
  color: var(--text);
  cursor: pointer;
}

.tpl-presidentielle-2027 .col-resources .form-check .file-info {
  display: block;
  font-size: 70%;
}

.tpl-presidentielle-2027 .col-resources .form-check .direct-download {
  position: absolute;
  top: 0;
  right: 0;
  width: 25px;
  height: 25px;
  background: url("../img/icon-arrow-download-primary-hover-circle.svg") no-repeat center;
  background-size: contain;
}

.tpl-presidentielle-2027 .col-resources .form-check .direct-download a {
  display: block;
  width: 100%;
  height: 100%;
}

/* Compteur + bouton de téléchargement groupé, sous la boîte bleue */
.tpl-presidentielle-2027 .col-resources .resources-action {
  display: flex;
  flex-direction: column;
  gap: var(--spacer);
  margin-top: 40px;
}

@media screen and (min-width: 768px) {
  .tpl-presidentielle-2027 .col-resources .resources-action {
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }
}

.tpl-presidentielle-2027 .col-resources .selected-elements {
  flex: 0 0 auto;
  font-family: var(--font-family-serif), serif;
  font-size: 15px;
  line-height: 22px;
  color: var(--text);
  white-space: nowrap;
}

.tpl-presidentielle-2027 .col-resources .btn-download {
  flex: 1 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 65px;
  padding: 12px 30px;
  border: 1px solid var(--primary-dark);
  border-radius: var(--radius);
  font-family: var(--font-family-serif), serif;
  font-size: 15px;
  color: var(--primary-dark);
}
