/*
Theme Name: Hello Elementor Child
Template: hello-elementor
Author: Lenny Copau
Version: 1.0
Description: Thème enfant basé sur Hello Elementor.
*/

/* css/pages-missions.css est chargé via functions.php */

/* ===== COULEURS =====
   Les 4 premières reprennent les couleurs globales d'Elementor (Réglages du site > Couleurs globales) :
   les modifier dans Elementor les modifie aussi ici. Déclarées sur body car Elementor définit
   ses variables sur body.elementor-kit-6. */
body {
  --jaune: var(--e-global-color-primary, #FFDC73);
  --bleu: var(--e-global-color-secondary, #3A7CF4);
  --texte: var(--e-global-color-text, #1D1D1B);
  --bleu-fonce: var(--e-global-color-accent, #2556AE);
  --jaune-pale: #FFF5D8;
  --bleu-pale: #C3D8FF;
  --creme: #FFFAF5;
}

html {
  scroll-behavior: smooth;
}

header{
  font-family: 'Helvetica Neue', sans-serif;
}

/* ===== TITRES =====
   Styles limités au contenu : ils ne s'appliquent pas aux titres du header, du footer ni des popups.
   Le :not(:where(...)) garde la même priorité qu'un simple "h2", donc les règles plus précises
   (cartes, offres d'emploi...) continuent de les remplacer. */

h1:not(:where([data-elementor-type="header"], [data-elementor-type="footer"], [data-elementor-type="popup"]) *){
  color: #000;
  leading-trim: both;
  text-edge: cap;
  font-family: "LEMON MILK";
  font-size: 2.5rem;
  font-style: normal;
  font-weight: 700;
  line-height: 100%; /* 3rem */

  margin-top : 1rem;
  margin-bottom: 2rem;

}

h2:not(:where([data-elementor-type="header"], [data-elementor-type="footer"], [data-elementor-type="popup"]) *){
  width: fit-content;
  background: var(--bleu-pale);

  color: #000;
  leading-trim: both;
  text-edge: cap;
  font-family: "LEMON MILK";
  font-size: 1.5rem;
  font-style: normal;
  font-weight: 700;
  line-height: 120%; /* 1.8rem */
  padding: 0.5rem;


  margin-top : 0.5rem;
  margin-bottom: 1rem;
}

h3:not(:where([data-elementor-type="header"], [data-elementor-type="footer"], [data-elementor-type="popup"]) *){
  color: var(--bleu);
  leading-trim: both;
  text-edge: cap;
  font-family: "LEMON MILK";
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 700;
  line-height: 125%; /* 1.5625rem */

  margin-top : 0.5rem;
  margin-bottom: 1rem;
}

h3:not(:where([data-elementor-type="header"], [data-elementor-type="footer"], [data-elementor-type="popup"]) *)::before{
  content : "-";
  color: var(--bleu);
  margin-right: 0.5rem;
}

h4:not(:where([data-elementor-type="header"], [data-elementor-type="footer"], [data-elementor-type="popup"]) *){
  color: var(--texte);
  text-edge: cap;
  font-family: "LEMON MILK";
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 125%; /* 1.5625rem */
}

h5:not(:where([data-elementor-type="header"], [data-elementor-type="footer"], [data-elementor-type="popup"]) *){
  color: var(--texte);
  leading-trim: both;
  text-edge: cap;
  font-family: "Helvetica Neue";
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 700;
  line-height: 125%; /* 1.5625rem */
  margin-top : 0.5rem;
  margin-bottom: 1rem;
}

p{
  margin : 1rem 0;
  line-height: 110%;
  font-weight: 400;
}

a{
  text-decoration: none;
  color : var(--bleu);
}

a:hover{
  color : var(--bleu-fonce);
}


/* ===== NAVIGATION DESKTOP ===== */
.menu-description {
  display: flex;
  justify-content: right;
  align-items: center;
  gap: 3.25rem;
  padding: 0;
  list-style: none;
  margin: 0;
  font-family: 'Helvetica Neue', sans-serif;

}

/* ÉLÉMENTS DE PREMIER NIVEAU */
.menu-description > .menu-item-depth-0 > a {
  font-weight: bold;
  color: #000;
  text-decoration: none;
  font-size: 1rem;
  text-wrap: nowrap;
}

.menu-description > .menu-item-depth-0 > a:hover{
  color : var(--bleu);
}

/* ===== SOUS-MENU DESKTOP ===== */
.sub-menu {
  display: inline-flex;
  padding: 1.5rem;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  background-color: white;
  list-style: none;
  margin: 0;
}

/* LIENS DE SOUS-MENU */
.sub-menu > li > a {
  color: var(--bleu);
  font-weight: bold;
  text-decoration: none;
  font-size: 1rem;
}

.sub-menu > li{
  transition: transform ease-out 200ms;
}

.sub-menu > li:hover{
  transform:translateX(5px);
}

.menu-item.menu-item-depth-1{
  margin-top: 0.5rem;
  margin-bottom : 0.5rem;
}

/* DESCRIPTIONS DYNAMIQUES */
.sub-menu > li > a small {
  color: #303031;  
  font-weight: 400;
  font-size: 0.875rem;
  display: block;
}

/* Cacher les sous-menus par défaut */

.menu-item .sub-menu {
  display: none;
}

.menu-item.open .sub-menu {
  display: block;
}

.menu-description .sub-menu {
  position: absolute;
  background-color: var(--creme);
  z-index: 10;
  padding: 1.5rem;
  min-width: 250px;
  max-width: 300px;
  top: 180%;
  left: 0;

  
}

/* Positionnement du parent */
.menu-description > .menu-item-depth-0 {
  position: relative;
}

/* FLÈCHE à droite du parent */
.menu-item-has-children > a::after {
  content: "▼";
  display: inline-block;
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
  font-size: 0.75rem;
}

/* Quand ouvert : faire pivoter la flèche */
.menu-item.menu-item-depth-0.open > a::after {
  transform: rotate(180deg);
}

/* Cacher le sous-menu quand il y a pas .closed sur le parent */
.menu-item.menu-item-depth-0.closed .sub-menu {
  display: none;
  opacity: 0;
  visibility: hidden;
}

/* Afficher le sous-menu quand .open est sur le parent */
.menu-item.menu-item-depth-0.open .sub-menu {
  display: block;
  opacity: 1;
  visibility: visible;
}



/* ===== NAVIGATION BURGER MOBILE ===== */

.mobile-nav-bar{
  display: flex;
  flex-direction: row;
  width : 100%;
  justify-content: space-between;
  align-items: center;
  background-color: #FFF;
  padding: 0 1.5rem;  
}

.mobile-nav-bar img{
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  flex-shrink: 0;
}

.mobile-nav-bar button#burger-button{
  background: none;
  color : var(--bleu);
  border : none;
  font-size: 2rem;
}

.mobile-submenu-title {
  font-weight: bold;
  cursor: pointer;
}

.mobile-menu.open{
  display: block;
}

.mobile-menu.closed{
  display: none;
}

.mobile-menu{
  display: flex;
  padding: 2rem;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 2.125rem;
  background: #FFF3D0;
  width : 100%
}

.mobile-menu button, .mobile-menu-list li{
  background: none;
  color : #000;
  padding : 0;
  display: flex;
  flex-direction: column;
  font-weight: 600;
}

.mobile-menu button{
  display: flex;
  flex-direction: row;
}

.mobile-menu button:hover{
  background: none;
}

.mobile-menu button:after{
  content: "▼";
  display: inline-block;
  margin-left: 0.5rem;
  transition: 200ms ease;
}

.mobile-menu button[aria-expanded="true"]:after{
  transform: rotate(180deg);
}

.mobile-menu li{
  list-style: none;
  padding: 0;
  margin : 0;
}



.mobile-submenu {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin : 1rem 0rem;
}

ul.mobile-menu-list{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding : 0;
  margin : 0;
}

ul.mobile-menu-list > li > a{
  color : #000;
}

.mobile-submenu.hidden {
  display: none;
}

.mobile-submenu-toggle {
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: bold;
  padding: 0.5rem 0;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.mobile-submenu li{
  display: flex;
  flex-direction: row;
  color : var(--bleu) ; 
}

.mobile-submenu li:before{
  content: "→";
  margin-right : 1rem;
}

.extra-menu-mobile, .extra-menu-mobile ul, .extra-menu-mobile .liens-réseaux-mobile {
  display: flex;
  flex-direction: row;
  gap : 1rem;
  justify-content: space-between;
  align-items: center;
  margin : 0;
  padding : 0;
}

.extra-menu-mobile{
  margin-top : 2rem;
}

.extra-menu-mobile ul{
  width : 100%;
  justify-content: left;
  gap : 1rem;
}

.extra-menu-mobile .liens-réseaux-mobile{
  width : 10rem;
  justify-content: right;
}

.extra-menu-mobile .liens-réseaux-mobile img{
  min-height: 24px;
  min-width: 24px;
}

.extra-menu-mobile ul li a{
  color: #5C5C59;
  text-align: center;
  font-family: "Helvetica Neue";
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 110%; /* 1rem */
}

/* SECTION FAQ */


.section-faq{
  display: flex;
  flex-direction: column;
  gap : 2rem;
  width : 100%;
}

.container-faq .question{
  display: flex;
  flex-direction: row;
  background-color: #FFF1C9;
  justify-content: space-between;
  align-items: center;
  width : 100%;

  padding: 3rem 5rem;

  font-size: 1.25rem;

  cursor : pointer;
}

.container-faq .question .croix, .container-faq .question{
  margin : 0;
}

.container-faq .question .croix{
  color : var(--bleu);
  transition : 200ms ease;
}

.container-faq.open .question .croix {
  transform : rotate(135deg);
}

.container-faq.open .reponse {
  display: block;
  display: flex;
  flex-direction: column;
  background-color: #FFFCF2;
  padding: 4rem 5rem;
}

.container-faq.closed .reponse {
  display: none;
}



.container-faq .reponse a{
  color : var(--bleu-fonce);
  width : fit-content;
}

/* BOUTONS */


/* CLAIR (info) */
.elementor-element.elementor-button-info .elementor-button {
  background-color: #FFFAF5E5;
  color : var(--bleu-fonce);
}
.elementor-element.elementor-button-info .elementor-button:hover {
  background-color: #FFFAF5B2;
}

/* FONCÉ (success) */
.elementor-element.elementor-button-success .elementor-button {
  background-color: #1D1D1BE5;
  color: var(--creme);
}
.elementor-element.elementor-button-success .elementor-button:hover {
  background-color: #1D1D1BB2;
}

/* CONTOUR BLEU (warning) */
.elementor-element.elementor-button-warning .elementor-button {
  background: none;
  background-color : transparent;
  border: 3px solid var(--bleu) ;
  color: var(--bleu);
}
.elementor-element.elementor-button-warning .elementor-button:hover {
  border: 3px solid var(--bleu-fonce) ;
  color: var(--bleu-fonce);
}

/* CONTOUR BLANC (danger) */
.elementor-element.elementor-button-danger .elementor-button {
  background-color: transparent;
  color: var(--creme);
  border: 2px solid var(--creme);
}
.elementor-element.elementor-button-danger .elementor-button:hover {
  background-color: rgba(219, 215, 211, 0.2);
  color: rgba(219, 215, 211, 0.671);
}

/* FIL D'ARIANE */

.fil-ariane{
  color : var(--texte);

}

.fil-ariane a{
  color : var(--texte);
}

.fil-ariane .active{
  color : var(--bleu);
}

.cat-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.chapo{
  /* display: flex; */
  padding: 2rem;
  justify-content: center;
  /* align-items: flex-start; */
  gap: 0.5rem;
  align-self: stretch;
  border: 2px dashed var(--bleu);
  background: var(--jaune-pale);

  margin: 2rem 0;
}

.encart{
  padding: 3rem;
  background: rgba(255, 220, 115, 0.28);
  color: #000;
  font-style: normal;
  font-weight: 400;
  line-height: 110%;
}

.contenu-actu h1{
  color: #000;
  leading-trim: both;
  text-edge: cap;
  font-family: "LEMON MILK";
  font-size: 2.5rem;
  font-style: normal;
  font-weight: 700;
  line-height: 130%;
}

.contenu-actu h2{
  display: flex;
  padding: 0.5rem;
  justify-content: center;
  align-items: flex-start;
  gap: 0.5rem;
  align-self: stretch;

  background: var(--jaune);

  color: #000;
  leading-trim: both;
  text-edge: cap;
  font-family: "LEMON MILK";
  font-size: 1.5rem;
  font-style: normal;
  font-weight: 700;
  line-height: 120%; /* 1.8rem */
}

blockquote, .citation{
  display: flex;
  position: relative;
  padding: 4.5rem 4.6875rem;
  justify-content: center;
  align-items: flex-start;
  align-content: flex-start;
  align-self: stretch;
  flex-wrap: wrap;
}

blockquote::before,
blockquote::after, .citation::before, .citation::after {
  font-family: serif;
  font-size: 20rem;
  color: #ffebbc6b;
  position: absolute;
  z-index: -1;
  line-height: 110%;
}

blockquote::before, .citation::before {
  content: '«';
  top: -6rem;
  left: -1rem;
}

.card-ressource{
  display: flex;
  min-width: 15rem;
  width:33%;
  max-width: 22rem;
  padding: 2.5rem;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  transition : 200ms ease-out;
}

.card-ressource-bleu{
  border : 4px var(--bleu) solid;
}

.card-ressource-jaune{
  border : 4px var(--jaune) solid;
}

.card-ressource-bleu:hover{
  transform : scale(0.95);
  border-color : var(--bleu-pale);
}
.card-ressource-jaune:hover{
  transform : scale(0.95);
  border : 4px var(--jaune-pale) solid;
}

/* ===== TITRES H1 SUR MOBILE =====
   Elementor fixe les h1 à 56px (Réglages du site > Typographie) et les titres d'articles à 40px
   (modèle « Article » #408) : un mot long comme « RESSOURCES » ou « collectivement » dépasse alors
   de l'écran et la page défile horizontalement. Sur mobile, la taille suit la largeur de l'écran.
   Ces tailles pourraient aussi être réglées dans Elementor (version mobile de la typographie). */
@media (max-width: 767px) {
  /* Titres de page : env. 41px sur 375px, 35px sur 320px */
  .elementor-kit-6 h1 {
    font-size: clamp(2rem, 11vw, 3.5rem);
    overflow-wrap: break-word;
  }

  /* Titres d'articles (phrases longues) : env. 28px sur 375px, 24px sur 320px */
  .elementor-408 .elementor-element.elementor-element-d04646d .elementor-heading-title {
    font-size: clamp(1.5rem, 7.5vw, 2.5rem);
    overflow-wrap: break-word;
  }
}

/* ===== FOOTER SUR TABLETTE (768 à 1024px) =====
   Le logo et les 3 colonnes de liens étaient sur une seule ligne : colonnes de 80px,
   textes qui débordaient. Le logo passe au-dessus, les colonnes se partagent la largeur,
   et la ligne du bas (copyright, mentions...) passe à la ligne proprement.
   (#255 = modèle Elementor du footer) */
@media (min-width: 768px) and (max-width: 1024px) {
  .elementor-255 .elementor-element.elementor-element-f167ee0 {
    flex-wrap: wrap;
    row-gap: 2rem;
  }

  .elementor-255 .elementor-element.elementor-element-9c6b56d {
    width: 100%;
    flex: 0 0 100%;
  }

  .elementor-255 .elementor-element.elementor-element-9c6b56d img {
    width: 8rem;
  }

  .elementor-255 .elementor-element.elementor-element-ac8691d,
  .elementor-255 .elementor-element.elementor-element-ea414c9,
  .elementor-255 .elementor-element.elementor-element-eb49603 {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .elementor-255 .elementor-element.elementor-element-425e2fd {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem;
  }

  [data-elementor-type="footer"] .elementor-widget-text-editor ul {
    padding-left: 1.25rem;
  }
}

/* Liens du footer : zone tactile d'au moins 24px de haut sur mobile et tablette */
@media (max-width: 1024px) {
  [data-elementor-type="footer"] .elementor-widget-text-editor li a {
    display: inline-block;
    padding: 0.25rem 0;
  }
}

/* ===== ACCESSIBILITÉ : FOCUS CLAVIER =====
   Contour bien visible quand on navigue au clavier (Tab). :focus-visible ne s'affiche pas au clic souris.
   Bleu foncé : contraste suffisant sur fond blanc, crème, jaune et bleu clair. */
:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid var(--bleu-fonce);
  outline-offset: 2px;
}

/* Elementor retire le contour des champs de formulaire : on le remet pour le clavier */
.elementor-field-group .elementor-field-textual:focus-visible {
  outline: 3px solid var(--bleu-fonce);
  outline-offset: 2px;
}

/* Questions de FAQ cliquables au clavier (role="button") */
.container-faq .question:focus-visible {
  outline-offset: -3px;
}
