/* =========================
   Variables globales
========================= */
:root {
  --color-primary: #007FBB;   /* Bleu foncé */
  --color-secondary: #7CC2E1; /* Bleu clair */
  --color-neutral: #58595B;   /* Gris foncé */
  --color-white: #FFFFFF;
}

.hero-title {
    background-color: #007fbb;
    text-align: left;
    color: #fff;
}

.hero-title .hero-subtitle {
    font-size: 1.2rem; /* plus petit que H2 */
    font-weight: 300;  /* léger */
    margin: 0;         /* supprime marge par défaut */
    color: #fff;
}

.hero-title .hero-heading {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 0.2em 0 0; /* réduit l’espace entre les deux lignes */
    color: #fff;
}

.hero-banner {
    filter: contrast(95%) brightness(98%);
}

/* =========================
   Polices locales (DesjardinsSans)
========================= */
@font-face {
  font-family: 'DesjardinsSans';
  src: url('../fonts/DesjardinsSans-Thin.woff2') format('woff2');
  font-weight: 100;
  font-style: normal;
}
@font-face {
  font-family: 'DesjardinsSans';
  src: url('../fonts/DesjardinsSans-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: 'DesjardinsSans';
  src: url('../fonts/DesjardinsSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'DesjardinsSans';
  src: url('../fonts/DesjardinsSans-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
}
@font-face {
  font-family: 'DesjardinsSans';
  src: url('../fonts/DesjardinsSans-Semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: 'DesjardinsSans';
  src: url('../fonts/DesjardinsSans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'DesjardinsSans';
  src: url('../fonts/DesjardinsSans-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
}

/* =========================
   Application globale
========================= */
body {
  font-family: 'DesjardinsSans', sans-serif;
  color: var(--color-neutral);
  font-size: 16px;
  line-height: 1.6;
}

/* =========================
   Titres adaptatifs
========================= */
h1, h2, h3 {
  font-family: 'DesjardinsSans', sans-serif;
  font-weight: 700;
  margin-bottom: 0.5em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 2rem); }

/* =========================
   Fond sombre / clair
========================= */
.section-dark h1,
.section-dark h2,
.section-dark h3 {
    color: var(--color-white);
}

.section-light h1,
.section-light h2,
.section-light h3 {
    color: var(--color-primary);
}

/* =========================
   Harmonisation des sections colorées
========================= */

/* Forcer le texte blanc dans les sections colorées */
.has-background,
.has-background h1,
.has-background h2,
.has-background h3,
.has-background h4,
.has-background h5,
.has-background h6 {
    color: #fff !important;
}

/* Cibler les classes Gutenberg */
.has-background .has-text-color,
.has-background .has-white-color {
    color: #fff !important;
}

/* Liens dans les sections colorées */
.has-background a {
    color: #fff !important;
}

/* Boutons dans les sections colorées */
.has-background .btn,
.has-background .btn-large {
    background-color: transparent !important;
    border: 2px solid #fff !important;
    color: #fff !important;
}
/* =========================
Limiter la largeur des blocs texte + image
========================= */
.wp-block-media-text,
.wp-block-group {
    max-width: 700px; /* Largeur max sur desktop */
    margin: 0 auto;
    padding: 0 1rem;
}

/* Responsive : sur mobile, largeur quasi pleine */
@media screen and (max-width: 768px) {
    .wp-block-media-text,
    .wp-block-group {
        max-width: 95%;
        padding: 0 0.5rem;
    }
}

.wp-block-heading.has-text-align-center {
    text-align: center !important;
    display: block; /* pour éviter les effets inline-block */
    margin-left: auto;
    margin-right: auto;
}

/* =========================
Titres H3 avec fond bleu pâle
========================= */
.wp-block-heading.has-background {
    max-width: 600px; /* Limite pour rester sous le H2 */
    margin: 0 auto 1rem;
    text-align: center;
    font-size: clamp(1rem, 2.5vw, 1.4rem); /* Plus petit que H2 */
    font-weight: 600;
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
    padding: 0.4rem 0.8rem;
    background-color: var(--color-secondary); /* Bleu pâle */
    color: var(--color-neutral);
    display: inline-block;
    border-radius: 4px;
}

/* Responsive : réduire encore la taille sur mobile */
@media screen and (max-width: 480px) {
    .wp-block-heading.has-background {
        font-size: 1rem;
        padding: 0.3rem 0.6rem;
    }
}

/* =========================
Réduction des espacements internes
========================= */
.wp-block-group > *:not(:last-child),
.wp-block-media-text > *:not(:last-child) {
    margin-bottom: 0.8rem; /* Réduit l’espace entre les éléments */
}

.wp-block-group,
.wp-block-media-text {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* =========================
   Boutons personnalisés
========================= */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 4px;
  padding: 0.75em 1.5em;
  font-weight: 600;
  text-transform: uppercase;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: inline-block;
}
.btn-primary:hover {
  background-color: var(--color-secondary);
  color: var(--color-neutral);
  cursor: pointer;
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-neutral);
  border: none;
  border-radius: 4px;
  padding: 0.75em 1.5em;
  font-weight: 600;
  text-transform: uppercase;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.btn-secondary:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.wp-block-heading.has-background {
    color: #fff !important;
}

.wp-block-heading.has-background strong,
.wp-block-heading.has-background em {
    color: #fff !important;
}

h2.wp-block-heading.has-background {
    color: #fff !important;
}


/* =========================
   Section "Au fil du temps"
========================= */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 4em;
}
.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  max-width: 700px;
  margin: 0 auto;
}
.timeline-item.left { flex-direction: row; }
.timeline-item.right { flex-direction: row-reverse; }
.timeline-item .content { max-width: 700px; }
.timeline-item .image-text img {
  max-width: 300px;
  height: auto;
  margin-bottom: 1rem;
}
.timeline-item h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.timeline-item p { line-height: 1.6; font-size: 1rem; }

/* Responsive */
@media screen and (max-width: 768px) {
  .timeline-item {
    flex-direction: column !important;
    text-align: center;
  }
  .timeline-item .image-text img {
    max-width: 90%;
    margin: 0 auto 1rem;
  }
}

/* =========================
   Gutenberg blocs
========================= */
.wp-block-group,
.wp-block-media-text {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1rem;
}
.wp-block-media-text {
  gap: 2rem;
}
@media screen and (max-width: 768px) {
  .wp-block-media-text {
    display: block;
    text-align: center;
  }
  .wp-block-media-text img {
    margin-bottom: 1rem;
  }
}
.hero-banner {
    height: 400px; /* Ajuste selon ton design */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media screen and (max-width: 768px) {
    .hero-banner {
        height: 250px; /* Ajuste pour mobile */
    }
}

/* Centrage global pour les titres Gutenberg */
.wp-block-heading.has-text-align-center {
    text-align: center !important;
    display: block;
    width: 100%;
}

/* Spécifique à la timeline */
.timeline-item .content {
    max-width: 700px;       /* garde la limite pour la lisibilité */
    margin: 0 auto;         /* centre le bloc dans le conteneur flex */
    text-align: center;     /* centre le texte à l'intérieur */
}

.timeline-item .wp-block-heading.has-text-align-center {
    display: block;
    width: 100%;
    text-align: center !important;
}

/* =========================
   Menu principal
========================= */
.menu li > a {
  font-family: 'DesjardinsSans', sans-serif;
  font-weight: 700;
  color: var(--color-neutral);
  transition: color 0.3s ease;
}


.menu li > a:hover {
  color: var(--color-primary);
}

.wp-block-image.aligncenter.size-full img {
    max-width: 1920px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}