/* FORMA Territoires — CSS institutionnel finalisé — 03/11/2026
 * Pages : Accueil V13 ; Concevoir ; Savoir-faire V1.4 ; Réseau V1.2 ; Rencontres V1.2.
 * Styles Gutenberg externalisés ; aucune modification de contenu ou de largeur.
 * Les encadrés bleu clair restent sans bordure. Les styles des cartes AREOI
 * restent dans bootstrap-custom.css ; ceux du module pédagogique dans
 * parcours-hybride.css. Ne modifie pas les feuilles générales du thème.
 */

/*========================================================================
 * RÈGLES COMMUNES AUX PAGES INSTITUTIONNELLES
 * Mutualisation conservatrice : sélecteurs inchangés, sans bordure ajoutée.
 ========================================================================*/

/* Fonds bleu clair des sections de présentation (aucune bordure). */
.ft-concevoir-cadre.wp-block-group,
.ft-sf-v1-intro.wp-block-group,
.ft-sf-v1-memoires,
.ft-reseau-v1 .ft-reseau-intro-flottante,
.ft-reseau-v1 .ft-reseau-rencontres,
.ft-rencontres-v1 .ft-rv1-section.ft-rv1-format,
.ft-rencontres-v1 .ft-rv1-section.ft-rv1-reseau {
  background: #DCE5F0;
  box-sizing: border-box;
}

/* Introductions Savoir-faire et Réseau : même bloc, même photo flottante. */
.ft-sf-v1-intro.wp-block-group,
.ft-reseau-v1 .ft-reseau-intro-flottante {
  display: flow-root;
  padding: 24px 32px;
  margin-top: 0;
  margin-bottom: 0;
}

.ft-sf-v1-intro figure.ft-sf-v1-photo-flottante,
.ft-reseau-v1 .ft-reseau-intro-flottante figure.ft-reseau-photo-flottante {
  float: right;
  width: 47%;
  max-width: 47%;
  margin: 0 0 18px 34px !important;
}

.ft-sf-v1-intro figure.ft-sf-v1-photo-flottante img,
.ft-reseau-v1 .ft-reseau-intro-flottante figure.ft-reseau-photo-flottante img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/*========================================================================
 * ACCUEIL — V13
 ========================================================================*/

/* Carrousel Rencontres sur l'accueil V13. */
.ft-rencontres-v13 .ft-rencontres-v13-cols.wp-block-columns {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-top: 0;
  margin-bottom: 0;
}
.ft-rencontres-v13 .ft-rencontres-v13-cols > .wp-block-column {
  flex: 1 1 0;
  min-width: 0;
}
.ft-rencontres-v13 .ft-rencontres-v13-texte > p:first-child {
  margin-top: 0 !important;
}
.ft-rencontres-v13 .ft-rencontres-programme { margin-bottom: 12px; }
.ft-rencontres-v13 .carousel-inner { overflow: hidden; }
.ft-rencontres-v13 .carousel-item { min-height: 0; }
.ft-rencontres-v13 .ft-rencontre-slide { position: relative; }
.ft-rencontres-v13 .ft-rencontre-slide .wp-block-image { margin: 0; }
.ft-rencontres-v13 .ft-rencontre-slide .wp-block-image img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
}
.ft-rencontres-v13 .ft-rencontre-legende {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  padding: 16px 18px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.19), transparent);
  color: #fff;
  pointer-events: none;
}
.ft-rencontres-v13 .ft-rencontre-legende p {
  margin: 0 0 6px;
  color: #fff;
}
.ft-rencontres-v13 .ft-rencontre-legende p:last-child { margin-bottom: 0; }
.ft-rencontres-v13 .ft-rencontre-legende strong { color: #fff; }
.ft-rencontres-v13 .carousel-control-prev,
.ft-rencontres-v13 .carousel-control-next {
  top: 0 !important;
  bottom: auto !important;
  height: 260px !important;
  width: 44px !important;
  z-index: 3;
}
.ft-rencontres-v13 .carousel-control-prev-icon,
.ft-rencontres-v13 .carousel-control-next-icon {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.4));
}
.ft-rencontres-v13 .carousel-indicators { display: none !important; }
@media (max-width: 781px) {
  .ft-rencontres-v13 .ft-rencontres-v13-cols.wp-block-columns {
    flex-direction: column;
    gap: 16px;
  }
  .ft-rencontres-v13 .ft-rencontres-v13-cols > .wp-block-column {
    flex: 0 1 auto;
    width: 100%;
  }
  /* Lecture de la présentation avant le programme sur mobile */
  .ft-rencontres-v13 .ft-rencontres-v13-texte { order: -1; }
}


/* Illustrations des trois cartes « Notre manière d’agir ». */

.ft-piliers-areoi-v12 .wp-block-image {
  margin-bottom: 12px;
}

.ft-piliers-areoi-v12 .wp-block-image img {
  display: block;
  width: 100%;
  height: auto;
}


/*========================================================================
 * CONCEVOIR LES APPRENTISSAGES — Encadré de présentation
 * Les styles du shortcode [parcours_hybride] restent dans parcours-hybride.css.
 ========================================================================*/
.ft-concevoir-cadre.wp-block-group {
  padding: 24px 32px;
  margin-bottom: 32px;
}

.ft-concevoir-cadre > h2.wp-block-heading {
  color: #163860;
  margin-top: 0 !important;
  margin-block-start: 0 !important;
}

.ft-concevoir-cadre > p:last-child {
  margin-bottom: 0;
}

@media (max-width: 781px) {
  .ft-concevoir-cadre.wp-block-group {
    padding: 18px;
    margin-bottom: 28px;
  }
}

/*========================================================================
 * FAIRE VIVRE ET TRANSMETTRE LES SAVOIR-FAIRE — V1.4
 ========================================================================*/

/* Présentation locale de la page Savoir-faire V1.4. */
.ft-sf-v1-title {
  margin-top: 0;
  margin-bottom: 20px;
  color: #163860;
  font-weight: 600;
}
/* Introductions et photos : voir règles communes ci-dessus. */
.ft-sf-v1-intro > h2.ft-sf-v1-title {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
}
.ft-sf-v1-intro > p:last-child,
.ft-sf-v1-site .wp-block-column > p:last-child {
  margin-bottom: 0;
}
/* La section de création de sites conserve ses colonnes et son alignement. */
.ft-sf-v1-site.wp-block-columns {
  display: flex;
  gap: 34px;
  margin-top: 0;
  margin-bottom: 0;
  align-items: center;
}
.ft-sf-v1-section {
  margin-top: 54px;
}
.ft-sf-v1-section > .wp-block-heading:first-child {
  margin-top: 0;
}
.ft-sf-v1-confidentialite {
  margin: 22px 0;
  padding: 20px 24px;
  background: #f1f5f9;
  border-left: 4px solid #163860;
}
.ft-sf-v1-confidentialite > p:last-child {
  margin-bottom: 0;
}
.ft-sf-v1-objectif {
  color: #163860;
  font-weight: 600;
  margin-top: 22px;
}
.ft-sf-v1-memoires {
  margin-top: 54px;
  padding: 24px 32px;
}
/* Neutraliser la marge de 40px du thème sur le titre de ce seul bandeau.
   Le sélecteur n'exige pas :first-child pour rester fiable dans Gutenberg. */
.ft-sf-v1-memoires h2.wp-block-heading.ft-sf-v1-title {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
  margin-bottom: 18px !important;
  padding-top: 0 !important;
}
.ft-sf-v1-memoires .wp-block-columns {
  align-items: center;
  gap: 32px;
  margin-bottom: 0;
}
.ft-sf-v1-memoires .wp-block-heading {
  color: #163860;
}
.ft-sf-v1-memoires .wp-block-column > p:last-child {
  margin-bottom: 0;
}
.ft-sf-v1-exemples {
  background: #fff;
  border: 1px solid #b9c9d9;
  padding: 18px;
  box-sizing: border-box;
}
.ft-sf-v1-exemples-entete {
  background: #163860;
  color: #fff;
  font-weight: 600;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.ft-sf-v1-exemple {
  padding: 11px 12px;
  border-bottom: 1px solid #dce5f0;
  color: #163860;
}
.ft-sf-v1-exemple:last-child {
  border-bottom: 0;
}
.ft-sf-v1-exemples-note {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: #465c70;
}
.ft-sf-v1-site {
  margin-top: 18px !important;
}
.ft-sf-v1-site-visuel {
  border: 1px solid #d6dfe7;
  background: #f5f7fa;
  box-shadow: 0 5px 16px rgba(22,56,96,.08);
}
.ft-sf-v1-site-barre {
  height: 32px;
  background: #e6edf3;
  border-bottom: 1px solid #ced9e5;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ft-sf-v1-site-point {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8ea6be;
}
.ft-sf-v1-site-en-tete {
  padding: 17px 20px;
  background: #163860;
  color: #fff;
  font-weight: 600;
}
.ft-sf-v1-site-contenu {
  padding: 21px 20px;
}
.ft-sf-v1-site-ligne {
  height: 9px;
  background: #c5d5e4;
  margin-bottom: 11px;
  width: 92%;
}
.ft-sf-v1-site-ligne.courte { width: 58%; }
.ft-sf-v1-site-bande {
  height: 75px;
  background: #dce5f0;
  margin: 17px 0;
}
.ft-sf-v1-site-legende {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #53697c;
}
.ft-sf-v1-contact {
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid #dce5f0;
}
.ft-sf-v1-contact > p:last-child { margin-bottom: 0; }
@media (max-width: 781px) {
  /* Sur mobile : textes d'abord, photographie ensuite ; sans flottement. */
  .ft-sf-v1-intro.wp-block-group {
    display: flex;
    flex-direction: column;
    padding: 16px 18px 20px;
  }
  .ft-sf-v1-intro > h2.ft-sf-v1-title,
  .ft-sf-v1-intro > p { order: 1; }
  .ft-sf-v1-intro figure.ft-sf-v1-photo-flottante {
    float: none;
    order: 2;
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
  }
  .ft-sf-v1-site.wp-block-columns,
  .ft-sf-v1-memoires .wp-block-columns {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }
  .ft-sf-v1-section,
  .ft-sf-v1-memoires { margin-top: 34px; }
  .ft-sf-v1-memoires { padding: 16px 18px 20px; }
  .ft-sf-v1-confidentialite { padding: 17px 18px; }
  .ft-sf-v1-site-visuel { max-width: 100%; }
}


/*========================================================================
 * LE RÉSEAU FORMA TERRITOIRES — V1.2
 ========================================================================*/

/* Styles propres au Réseau V1.2, sans limitation de largeur. */
.ft-reseau-v1 .ft-reseau-titre {
  color: #163860;
  font-weight: 600;
  margin-top: 0 !important;
  margin-block-start: 0 !important;
  margin-bottom: 20px !important;
}
/* Photo flottante : voir règles communes ci-dessus. */
.ft-reseau-v1 .ft-reseau-accent {
  color: #163860;
  font-weight: 600;
}
.ft-reseau-v1 .ft-reseau-section { margin-top: 46px; }
.ft-reseau-v1 .ft-reseau-section > .wp-block-heading:first-child {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
}
.ft-reseau-v1 .ft-reseau-rencontres {
  padding: 24px 32px 28px;
  margin-top: 46px;
}
.ft-reseau-v1 .ft-reseau-rencontres > .wp-block-heading:first-child {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
}
.ft-reseau-v1 .ft-reseau-programme.wp-block-columns {
  align-items: stretch;
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 20px;
}
.ft-reseau-v1 .ft-reseau-programme > .wp-block-column {
  background: #fff;
  border: 1px solid #B9C9D9;
  padding: 16px;
  box-sizing: border-box;
}
.ft-reseau-v1 .ft-reseau-programme .ft-reseau-date {
  color: #163860;
  font-weight: 700;
  margin-top: 0 !important;
  margin-bottom: 8px;
}
.ft-reseau-v1 .ft-reseau-programme .wp-block-column > p:last-child {
  margin-bottom: 0;
}
.ft-reseau-v1 .ft-reseau-rencontres > p:last-child {
  margin-bottom: 0;
}
.ft-reseau-v1 .ft-reseau-adhesion { margin-top: 18px; }
.ft-reseau-v1 .ft-reseau-adhesion .card-header,
.ft-reseau-v1 .ft-reseau-adhesion .card-header p {
  background: #163860;
  color: #fff;
}
.ft-reseau-v1 .ft-reseau-adhesion .card-header p { margin-bottom: 0; }
.ft-reseau-v1 .ft-reseau-contact {
  border-top: 1px solid #DCE5F0;
  margin-top: 46px;
  padding-top: 24px;
}
.ft-reseau-v1 .ft-reseau-contact > .wp-block-heading:first-child {
  margin-top: 0 !important;
  margin-block-start: 0 !important;
}
.ft-reseau-v1 .ft-reseau-contact p:last-child { margin-bottom: 0; }
@media (max-width: 781px) {
  /* Sur téléphone : conserver le titre et le texte avant la photo. */
  .ft-reseau-v1 .ft-reseau-intro-flottante {
    display: flex;
    flex-direction: column;
    padding: 18px 20px 22px;
  }
  .ft-reseau-v1 .ft-reseau-intro-flottante > .ft-reseau-titre,
  .ft-reseau-v1 .ft-reseau-intro-flottante > p { order: 1; }
  .ft-reseau-v1 .ft-reseau-intro-flottante figure.ft-reseau-photo-flottante {
    float: none;
    order: 2;
    width: 100%;
    max-width: 100%;
    margin: 0 0 18px !important;
  }
  .ft-reseau-v1 .ft-reseau-programme.wp-block-columns {
    flex-direction: column;
    gap: 18px;
  }
  .ft-reseau-v1 .ft-reseau-section,
  .ft-reseau-v1 .ft-reseau-rencontres,
  .ft-reseau-v1 .ft-reseau-contact { margin-top: 34px; }
  .ft-reseau-v1 .ft-reseau-rencontres { padding: 18px 20px 22px; }
}


/*========================================================================
 * LES RENCONTRES FORMA TERRITOIRES — V1.2 validée, ajustements consolidés
 ========================================================================*/

/* Programme et sections des Rencontres ; cartes AREOI gérées par le thème. */
.ft-rencontres-v1 .ft-rv1-section {
  margin-top: 52px;
}

/* Titres de cette page : réglages locaux, indépendants de base.css. */
.ft-rencontres-v1 h2.ft-rv1-title {
  color: #163860;
  font-weight: 600;
  margin-top: 0 !important;
  margin-block-start: 0 !important;
  margin-bottom: 20px;
}

.ft-rencontres-v1 .ft-rv1-intro > p:last-child,
.ft-rencontres-v1 .ft-rv1-section > p:last-child {
  margin-bottom: 0;
}

/* Introduction → programme : écart de 40px validé sur ordinateur. */
.ft-rencontres-v1 .ft-rv1-intro + .ft-rv1-section {
  margin-top: 40px !important;
  margin-block-start: 40px !important;
}

/* Images du programme 2027 et des formules de participation. */
.ft-rencontres-v1 .ft-rv1-programme .wp-block-image,
.ft-rencontres-v1 .ft-rv1-options .wp-block-image {
  margin: 0 0 16px;
}

.ft-rencontres-v1 .ft-rv1-programme .wp-block-image img,
.ft-rencontres-v1 .ft-rv1-options .wp-block-image img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.ft-rencontres-v1 .ft-rv1-programme .wp-block-image + p {
  margin-top: 0;
}

.ft-rencontres-v1 .ft-rv1-programme .wp-block-image img,
.ft-rencontres-v1 .ft-rv1-programme figure {
  max-width: 100%;
}

/* Encadrés bleu clair : fond commun et padding local validé. */
.ft-rencontres-v1 .ft-rv1-section.ft-rv1-format,
.ft-rencontres-v1 .ft-rv1-section.ft-rv1-reseau {
  padding: 24px 32px;
  padding-block-start: 24px !important;
}

.ft-rencontres-v1 .ft-rv1-format > h2.ft-rv1-title,
.ft-rencontres-v1 .ft-rv1-reseau > h2.ft-rv1-title {
  padding-top: 0 !important;
  padding-block-start: 0 !important;
}

.ft-rencontres-v1 .ft-rv1-format ul {
  margin-bottom: 22px;
}

/* Écart extérieur du premier encadré bleu, validé après migration. */
.ft-rencontres-v1 .ft-rv1-section.ft-rv1-format {
  margin-top: 40px !important;
  margin-bottom: 40px !important;
  margin-block-start: 40px !important;
  margin-block-end: 40px !important;
}

/* Deux cartes de participation. */
.ft-rencontres-v1 .ft-rv1-options {
  margin-top: 18px;
  margin-bottom: 20px;
}

.ft-rencontres-v1 .ft-rv1-options .wp-block-paragraph,
.ft-rencontres-v1 .ft-rv1-programme .wp-block-paragraph {
  overflow-wrap: break-word;
}

.ft-rencontres-v1 .ft-rv1-options ul.wp-block-list {
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 1.4rem;
}

.ft-rencontres-v1 .ft-rv1-options ul.wp-block-list li {
  margin-bottom: 9px;
}

.ft-rencontres-v1 .ft-rv1-options ul.wp-block-list li:last-child {
  margin-bottom: 0;
}

.ft-rencontres-v1 .ft-rv1-contact {
  padding-top: 24px;
  border-top: 1px solid #DCE5F0;
}

@media (max-width: 781px) {
  .ft-rencontres-v1 .ft-rv1-section {
    margin-top: 34px;
  }

  .ft-rencontres-v1 .ft-rv1-format,
  .ft-rencontres-v1 .ft-rv1-reseau {
    padding: 18px;
  }

  .ft-rencontres-v1 .ft-rv1-section.ft-rv1-format {
    margin-top: 28px !important;
    margin-bottom: 28px !important;
    margin-block-start: 28px !important;
    margin-block-end: 28px !important;
  }

  .ft-rencontres-v1 .ft-rv1-programme .wp-block-image img,
  .ft-rencontres-v1 .ft-rv1-options .wp-block-image img {
    height: auto;
  }
}
