/* ==========================================================================
   LES RETOURNÉES — Pages « Ressources utiles » et « Contact »

   Complète theme.css, dont viennent la marque, les boutons, .rt-mark et
   .rt-section. Ces deux pages n'ont pas de maquette : elles sont composées
   à partir du vocabulaire visuel de l'accueil et de Nos services — bandeau
   vert en ouverture, pastilles crème, cartes blanches à coins arrondis,
   surlignage menthe sur un fragment de titre.

   Contrainte commune : tout le contenu vient du back-office. Aucune hauteur
   figée, aucun nombre d'éléments supposé.
   ========================================================================== */

/* ==========================================================================
   BANDEAU D'OUVERTURE (partagé)
   ========================================================================== */
.rt-page-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(140px, 15vw, 232px) 0 clamp(72px, 8vw, 128px);
  background: linear-gradient(180deg, var(--rt-green-top), var(--rt-green-bottom));
  color: var(--rt-white);
  overflow: hidden;
}
/* La navbar se superpose au vert : sans ce dégagement en haut, le surtitre
   passerait sous le logo. D'où le padding généreux ci-dessus. */
.rt-page-hero__inner { position: relative; z-index: 1; max-width: 880px; text-align: center; margin-inline: auto; }
.rt-page-hero__eyebrow { display: block; margin-bottom: 18px; color: var(--rt-mint); }
.rt-page-hero__title {
  margin: 0;
  font-family: var(--rt-font-title); font-weight: 700;
  font-size: var(--rt-fs-h2); line-height: 1.12; letter-spacing: -.01em;
  color: var(--rt-white);
}
.rt-page-hero__lead {
  max-width: 680px; margin: 24px auto 0;
  font-size: var(--rt-fs-lead); line-height: 1.6;
  color: rgba(255, 255, 255, .85);
}
/* Ondulation décorative reprise de Nos services, très atténuée : elle donne
   de la matière au vert sans concurrencer le texte. */
.rt-page-hero__doodle {
  position: absolute; inset: auto -6% -35% auto;
  width: min(760px, 68%); opacity: .07; pointer-events: none;
}

/* ==========================================================================
   GED — BARRE DE RECHERCHE ET FILTRES
   ========================================================================== */
.rt-ged-filters { background: var(--rt-cream); padding-block: clamp(28px, 3.2vw, 44px); }
.rt-ged-search { display: flex; gap: 12px; max-width: 720px; margin-inline: auto; }
.rt-ged-search__field {
  flex: 1 1 auto; min-width: 0;
  padding: 15px 22px;
  border: 1px solid rgba(25, 74, 68, .16); border-radius: var(--rt-pill);
  background: var(--rt-white);
  font-family: var(--rt-font-body); font-size: var(--rt-fs-body); color: var(--rt-ink);
}
.rt-ged-search__field::placeholder { color: var(--rt-ink-soft); opacity: .75; }
.rt-ged-search__field:focus {
  outline: none;
  border-color: var(--rt-mint);
  box-shadow: 0 0 0 3px rgba(54, 199, 145, .28);
}
.rt-ged-search__submit { flex: none; }

/* ------- Pastilles de filtre ------- */
.rt-ged-chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  list-style: none; margin: 22px 0 0; padding: 0;
}
.rt-ged-chips__label {
  align-self: center; margin-right: 4px;
  font-size: var(--rt-fs-eyebrow); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--rt-ink-soft);
}
.rt-ged-chip {
  display: inline-block; padding: 8px 18px;
  border: 1px solid rgba(25, 74, 68, .14); border-radius: var(--rt-pill);
  background: var(--rt-white); color: var(--rt-green);
  font-family: var(--rt-font-body); font-weight: 600; font-size: 15px; line-height: 1.3;
  text-decoration: none;
  transition: background var(--rt-ease), color var(--rt-ease), border-color var(--rt-ease);
}
.rt-ged-chip:hover { border-color: var(--rt-green); color: var(--rt-green); }
.rt-ged-chip.is-active {
  background: var(--rt-green); border-color: var(--rt-green); color: var(--rt-white);
}
.rt-ged-chip--reset { background: transparent; border-style: dashed; color: var(--rt-orange-text); }
.rt-ged-chip--reset:hover { color: var(--rt-orange-text); border-color: var(--rt-orange-text); }

.rt-ged-count { margin: 20px 0 0; text-align: center; font-size: var(--rt-fs-body); color: var(--rt-ink-soft); }

/* ==========================================================================
   GED — SECTIONS
   Le fond alterne au rang d'affichage : le rédacteur ordonne ses rubriques
   sans avoir à choisir une couleur.
   ========================================================================== */
.rt-ged-section--cream { background: var(--rt-cream); }
.rt-ged-section__intro {
  max-width: 640px; margin: 18px auto 0;
  text-align: center; font-size: var(--rt-fs-lead); line-height: 1.55; color: var(--rt-ink-soft);
}
.rt-ged-section__body { margin-top: clamp(38px, 4vw, 64px); }

/* ------- Galerie d'infographies ------- */
/* Colonnes et non grille. Les infographies vont du presque carré (1,15:1) au
   panoramique (3,2:1) : une grille alignait les lignes sur la plus haute et
   laissait des trous sous les autres, tandis qu'un cadre de proportion fixe
   réduisait les plus larges de moitié — illisibles. En colonnes, chacune
   garde sa hauteur naturelle et l'empilement reste compact.
   L'ordre visuel devient vertical par colonne ; l'ordre de lecture, lui,
   suit le DOM et reste celui du back-office. */
.rt-ged-gallery {
  columns: 3 340px;
  column-gap: clamp(24px, 2.6vw, 44px);
  list-style: none; margin: 0; padding: 0;
}
.rt-ged-gallery > li {
  break-inside: avoid;
  margin-bottom: clamp(24px, 2.6vw, 44px);
}
.rt-ged-figure { margin: 0; }
.rt-ged-figure__frame {
  display: block; overflow: hidden;
  padding: clamp(10px, 1.4vw, 18px);
  border-radius: var(--rt-radius);
  background: var(--rt-white);
  box-shadow: 0 14px 40px rgba(21, 59, 54, .08);
}
.rt-ged-figure__frame img { display: block; width: 100%; height: auto; }
a.rt-ged-figure__frame { transition: transform var(--rt-ease), box-shadow var(--rt-ease); }
a.rt-ged-figure__frame:hover { transform: translateY(-4px); box-shadow: 0 22px 54px rgba(21, 59, 54, .14); }
.rt-ged-figure figcaption {
  margin-top: 16px;
  font-family: var(--rt-font-title); font-weight: 600;
  font-size: 1.15rem; line-height: 1.3; color: var(--rt-green);
}
.rt-ged-figure figcaption span {
  display: block; margin-top: 6px;
  font-family: var(--rt-font-body); font-weight: 400; font-size: 16px; color: var(--rt-ink-soft);
}

/* ------- Cartes de document ------- */
.rt-ged-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: clamp(20px, 2vw, 32px);
  list-style: none; margin: 0; padding: 0;
}
.rt-doc-card {
  display: flex; flex-direction: column; height: 100%;
  padding: clamp(24px, 2.2vw, 34px);
  border-radius: var(--rt-radius);
  background: var(--rt-white);
  box-shadow: 0 12px 34px rgba(21, 59, 54, .07);
}
.rt-ged-section--cream .rt-doc-card { box-shadow: 0 12px 34px rgba(21, 59, 54, .05); }
.rt-doc-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.rt-doc-card__icon {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px;
  background: rgba(54, 199, 145, .16); color: var(--rt-green);
}
/* Pastille de format : la seule information que le visiteur cherche avant
   de cliquer, avec le poids. */
.rt-doc-card__format {
  padding: 5px 12px; border-radius: var(--rt-pill);
  background: var(--rt-green); color: var(--rt-white);
  font-family: var(--rt-font-body); font-weight: 700; font-size: 12px; letter-spacing: .06em;
}
.rt-doc-card__weight { font-size: 14px; color: var(--rt-ink-soft); }
.rt-doc-card__title {
  margin: 0;
  font-family: var(--rt-font-title); font-weight: 700;
  font-size: 1.32rem; line-height: 1.25; color: var(--rt-green);
}
.rt-doc-card__text { margin: 12px 0 0; font-size: 16.5px; line-height: 1.6; color: var(--rt-ink-soft); }
.rt-doc-card__tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 18px 0 0; padding: 0; }
.rt-doc-card__tag {
  padding: 5px 12px; border-radius: var(--rt-pill);
  background: var(--rt-cream); color: var(--rt-green);
  font-size: 13.5px; font-weight: 600; text-decoration: none;
}
.rt-ged-section--cream .rt-doc-card__tag { background: rgba(25, 74, 68, .07); }
.rt-doc-card__tag:hover { background: var(--rt-mint); color: var(--rt-green); }
/* margin-top auto : les boutons s'alignent en bas quelle que soit la
   longueur des descriptions, sans hauteur imposée aux cartes. */
.rt-doc-card__foot { margin-top: auto; padding-top: 22px; }
.rt-doc-card__date { display: block; margin-bottom: 12px; font-size: 14px; color: var(--rt-ink-soft); }
.rt-doc-card__soon {
  display: inline-block; padding: 10px 20px;
  border: 1px dashed rgba(25, 74, 68, .3); border-radius: var(--rt-pill);
  font-weight: 600; font-size: 15px; color: var(--rt-ink-soft);
}

/* ------- Aucun résultat ------- */
.rt-ged-empty { max-width: 560px; margin-inline: auto; text-align: center; }
.rt-ged-empty__title {
  margin: 0 0 14px;
  font-family: var(--rt-font-title); font-weight: 700;
  font-size: var(--rt-fs-h3); color: var(--rt-green);
}
.rt-ged-empty p { margin: 0 0 26px; font-size: var(--rt-fs-lead); color: var(--rt-ink-soft); }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.rt-contact { padding-block: var(--rt-section-y); background: var(--rt-white); }
/* Le formulaire domine (3fr) : c'est l'action attendue. Les coordonnées
   l'accompagnent sans lui disputer la place. */
.rt-contact__grid {
  display: grid; grid-template-columns: 3fr 2fr;
  gap: clamp(32px, 4vw, 72px); align-items: start;
}

.rt-contact__panel {
  padding: clamp(28px, 3vw, 48px);
  border-radius: 24px;
  background: var(--rt-cream);
}
.rt-contact__panel-title {
  margin: 0 0 26px;
  font-family: var(--rt-font-title); font-weight: 700;
  font-size: var(--rt-fs-h3); line-height: 1.15; color: var(--rt-green);
}

/* ------- Formulaire ------- */
.rt-field { margin-bottom: 20px; }
.rt-field label {
  display: block; margin-bottom: 8px;
  font-family: var(--rt-font-body); font-weight: 600; font-size: 15.5px; color: var(--rt-green);
}
.rt-field input,
.rt-field select,
.rt-field textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(25, 74, 68, .16); border-radius: 14px;
  background: var(--rt-white);
  font-family: var(--rt-font-body); font-size: var(--rt-fs-body); line-height: 1.5; color: var(--rt-ink);
  transition: border-color var(--rt-ease), box-shadow var(--rt-ease);
}
.rt-field textarea { resize: vertical; min-height: 150px; }
.rt-field select {
  appearance: none; padding-right: 48px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23194A44' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center;
}
.rt-field input:focus,
.rt-field select:focus,
.rt-field textarea:focus {
  outline: none; border-color: var(--rt-mint);
  box-shadow: 0 0 0 3px rgba(54, 199, 145, .26);
}
/* Bordure et message en corail foncé : le corail de marque ne tient ni les
   4,5:1 du texte ni les 3:1 d'un indicateur non textuel, et c'est justement
   ici que le visiteur doit comprendre pourquoi son message n'est pas parti. */
.rt-field--error input,
.rt-field--error select,
.rt-field--error textarea { border-color: var(--rt-orange-text); }
.rt-field__error { margin: 8px 0 0; font-size: 15px; font-weight: 600; color: var(--rt-orange-text); }
.rt-field__hint { margin: 8px 0 0; font-size: 14.5px; color: var(--rt-ink-soft); }
.rt-form__actions { margin-top: 28px; }

/* Champ leurre anti-robots : invisible et hors du parcours au clavier, mais
   pas `display:none`, que certains automates savent détecter. */
.rt-form__trap {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}

/* ------- Coordonnées ------- */
.rt-contact__info { display: grid; gap: 18px; }
.rt-contact__item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px 24px;
  border-radius: 18px;
  background: var(--rt-white);
  border: 1px solid rgba(25, 74, 68, .1);
}
.rt-contact__item-icon {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(54, 199, 145, .16); color: var(--rt-green);
}
.rt-contact__item-label {
  margin: 0 0 4px;
  font-size: var(--rt-fs-eyebrow); font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--rt-orange-text);
}
.rt-contact__item-value { margin: 0; font-size: 16.5px; line-height: 1.5; color: var(--rt-green); }
.rt-contact__item-value a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(25, 74, 68, .25); }
.rt-contact__item-value a:hover { color: var(--rt-orange); border-color: var(--rt-orange); }

.rt-contact__socials { display: flex; gap: 12px; margin-top: 4px; }
.rt-contact__social {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--rt-green); color: var(--rt-white);
  transition: background var(--rt-ease), transform var(--rt-ease);
}
.rt-contact__social:hover { background: var(--rt-orange); color: var(--rt-white); transform: translateY(-2px); }

/* ------- Récapitulatif d'erreurs du formulaire -------
   La confirmation d'envoi, elle, est un message flash rendu par
   base.html.twig — voir .rt-flash dans theme.css. */
.rt-alert {
  display: flex; gap: 14px; align-items: flex-start;
  margin-bottom: 28px; padding: 20px 24px;
  border-radius: 16px;
  font-size: 16.5px; line-height: 1.55;
}
.rt-alert--ko { background: rgba(253, 85, 69, .12); color: var(--rt-orange-text); }
.rt-alert svg { flex: none; margin-top: 2px; }

@media (max-width: 991.98px) {
  .rt-contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
  .rt-ged-search { flex-direction: column; }
  .rt-ged-search__submit { width: 100%; text-align: center; }
  .rt-page-hero { padding-top: clamp(120px, 26vw, 160px); }
}

/* ==========================================================================
   ACTUALITÉS — liste et article
   ========================================================================== */
.rt-news-list .rt-news-card { min-height: 360px; }
.rt-news-list > [class*="col-"] { flex: 0 0 auto; width: 100%; }
@media (min-width: 576px) { .rt-news-list > [class*="col-"] { width: 50%; } }
@media (min-width: 992px) { .rt-news-list > [class*="col-"] { width: 33.3333%; } }

.rt-page-hero--article { padding-bottom: clamp(56px, 6vw, 96px); }
.rt-article__back {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 22px;
  font-weight: 700; font-size: 15px; letter-spacing: .02em; color: var(--rt-mint); text-decoration: none;
}
.rt-article__back:hover { color: var(--rt-white); }
.rt-article__date { display: block; margin-top: 18px; font-weight: 600; color: rgba(255, 255, 255, .78); }
.rt-article { padding-top: 0; }
.rt-article__inner { max-width: 860px; margin-inline: auto; }
.rt-article__figure { margin: calc(-1 * clamp(36px, 4vw, 64px)) 0 clamp(32px, 4vw, 52px); }
.rt-article__figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 24px; box-shadow: 0 24px 60px rgba(21, 59, 54, .16); }
.rt-article__inner > :first-child:not(.rt-article__figure) { margin-top: clamp(40px, 5vw, 72px); }
.rt-article__lead { margin-bottom: 28px; font-size: var(--rt-fs-lead); line-height: 1.55; font-weight: 600; color: var(--rt-green); }
.rt-article__body { font-size: var(--rt-fs-body); line-height: 1.7; color: var(--rt-ink); }
.rt-article__others { background: var(--rt-cream); }

/* ------- Article : précédent / suivant ------- */
.rt-article__nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: clamp(48px, 6vw, 88px); padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid rgba(25, 74, 68, .14);
}
.rt-article__nav-link {
  display: flex; align-items: center; gap: 16px; min-height: 112px;
  padding: 20px 22px; border-radius: 20px;
  background: var(--rt-cream); color: var(--rt-green); text-decoration: none;
  transition: transform var(--rt-ease), box-shadow var(--rt-ease), background var(--rt-ease);
}
.rt-article__nav-link:hover, .rt-article__nav-link:focus-visible {
  color: var(--rt-green); transform: translateY(-3px); box-shadow: 0 16px 40px rgba(21, 59, 54, .12); background: #F1E6D8;
}
.rt-article__nav-link--next { grid-column: 2; text-align: right; justify-content: flex-end; }
.rt-article__nav-arrow {
  flex: 0 0 auto; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--rt-orange); color: var(--rt-white); transition: transform var(--rt-ease);
}
.rt-article__nav-link--prev:hover .rt-article__nav-arrow { transform: translateX(-4px); }
.rt-article__nav-link--next:hover .rt-article__nav-arrow { transform: translateX(4px); }
.rt-article__nav-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rt-article__nav-label { font-family: var(--rt-font-body); font-weight: 700; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--rt-orange-text); }
.rt-article__nav-title { font-family: var(--rt-font-title); font-weight: 700; font-size: clamp(1.05rem, 1.4vw, 21px); line-height: 1.2; }
.rt-article__nav-date { font-size: 14px; font-weight: 600; color: var(--rt-ink-soft); }
@media (max-width: 767.98px) {
  .rt-article__nav { grid-template-columns: 1fr; }
  .rt-article__nav-spacer { display: none; }
  .rt-article__nav-link--next { grid-column: auto; }
}
