/*
 Theme Name:   Astra Child NCN WEB DEV
 Theme URI:
 Description:  thème enfant Astra
 Author:       Nathalie59
 Author URI:   https://staging.nathalie-nottebaert.fr
 Template:     astra
 Version:      1.1
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==========================================================================
   NCN WEB DEV — reglages transverses
   Le design vit dans Elementor (kit global + modeles Xpro).
   Ce fichier ne porte que ce qu'un widget ne peut pas exprimer :
   accessibilite, etats de focus, survol des cartes, lien d'evitement.
   ========================================================================== */

:root {
  --ncn-ink: #0D1730;
  --ncn-navy: #10307F;
  --ncn-navy-dark: #0A1F56;
  --ncn-signal: #FFC53D;
  --ncn-mint: #12C39A;
  --ncn-line: #DFE4F2;
  --ncn-surface: #F4F6FB;
}

/* --- Lien d'evitement (Astra) --------------------------------------------- */
.skip-link.screen-reader-text:focus {
  background: var(--ncn-ink);
  color: #fff;
  font-family: Sora, sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: 8px;
  left: 16px;
  top: 16px;
  z-index: 100000;
  box-shadow: none;
  clip: auto;
  clip-path: none;
  width: auto;
  height: auto;
}

/* --- Etat de focus visible partout ---------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible,
.elementor-button:focus-visible,
.e-n-accordion-item-title:focus-visible {
  outline: 3px solid var(--ncn-mint);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Contraste du focus sur les fonds bleu nuit et sur le pied de page */
#pied-de-page a:focus-visible,
#pied-de-page button:focus-visible,
.ncn-bloc-sombre a:focus-visible,
.ncn-bloc-sombre .elementor-button:focus-visible {
  outline-color: var(--ncn-signal);
}

/* --- Survol des cartes ----------------------------------------------------- */
.ncn-carte {
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.ncn-carte:hover,
.ncn-carte:focus-within {
  border-color: #2B52AD !important;
  transform: translateY(-3px);
  box-shadow: 0 14px 34px -18px rgba(13, 23, 48, 0.28);
}

/* --- Ancrages : compenser l'en-tete fixe ---------------------------------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

/* --- Formulaire WPForms : aligne sur le systeme --------------------------- */
.wpforms-container .wpforms-field-label {
  font-family: Sora, sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--ncn-ink);
  margin-bottom: 6px;
}
.wpforms-container .wpforms-field-sublabel,
.wpforms-container .wpforms-field-description {
  font-size: 13px;
  color: #616C87;
}
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container input[type="url"],
.wpforms-container input[type="number"],
.wpforms-container select,
.wpforms-container textarea {
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--ncn-line);
  border-radius: 8px;
  background: #fff;
  color: var(--ncn-ink);
  font-family: "Public Sans", sans-serif;
  font-size: 16px;
  box-shadow: none;
}
.wpforms-container textarea { min-height: 150px; }
.wpforms-container input:hover,
.wpforms-container select:hover,
.wpforms-container textarea:hover { border-color: #2B52AD; }
.wpforms-container input:focus,
.wpforms-container select:focus,
.wpforms-container textarea:focus {
  border-color: var(--ncn-navy);
  outline: 3px solid var(--ncn-mint);
  outline-offset: 2px;
}
.wpforms-container .wpforms-required-label { color: #B3261E; }
.wpforms-container button[type="submit"] {
  min-height: 48px;
  padding: 14px 32px;
  background: var(--ncn-navy);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-family: Sora, sans-serif;
  font-weight: 600;
  font-size: 15px;
  transition: background 180ms ease;
}
.wpforms-container button[type="submit"]:hover { background: var(--ncn-navy-dark); }
.wpforms-container .wpforms-error {
  color: #B3261E;
  font-size: 13px;
}

/* ==========================================================================
   DECORS GEOMETRIQUES
   Quart de disque et hachures a 45 degres, reprise du motif de marque.
   Purement decoratif : pose en pseudo-elements, donc invisible pour les
   lecteurs d'ecran et sans element vide dans l'editeur.
   ========================================================================== */

.ncn-deco { position: relative; overflow: hidden; }
.ncn-deco > * { position: relative; z-index: 1; }
.ncn-deco::before,
.ncn-deco::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

/* Hachures : corail sur fond clair, indigo clair sur fond sombre */
.ncn-hachure-corail::after {
  background-image: repeating-linear-gradient(-45deg, #EB5A5D 0 2px, transparent 2px 9px);
  opacity: 0.55;
}
.ncn-hachure-bleu::after {
  background-image: repeating-linear-gradient(-45deg, #A9A8F5 0 2px, transparent 2px 9px);
  opacity: 0.6;
}

/* Heros : grand quart de disque en surface a droite, hachures en bas a gauche */
.ncn-deco-hero::before {
  width: 520px; height: 520px;
  right: -140px; top: -120px;
  border-radius: 0 0 0 100%;
  background: #EAEEFA;
}
.ncn-deco-hero::after {
  width: 150px; height: 150px;
  left: -40px; bottom: 60px;
  border-radius: 100% 0 0 0;
}

/* Section claire : petit quart de disque corail cale en haut a gauche */
.ncn-deco-corail::before {
  width: 90px; height: 90px;
  left: 2%; top: 40px;
  border-radius: 100% 0 0 0;
  background: #EB5A5D;
}
.ncn-deco-corail::after { display: none; }

/* Section claire : quart de disque bleu a droite */
.ncn-deco-bleu::before {
  width: 110px; height: 110px;
  right: 4%; top: 60px;
  border-radius: 100% 0 0 0;
  transform: rotate(90deg);
  background: #3533CD;
}
.ncn-deco-bleu::after { display: none; }

/* Bande sombre : hachures en bas a gauche */
.ncn-deco-sombre::before { display: none; }
.ncn-deco-sombre::after {
  width: 200px; height: 200px;
  left: -60px; bottom: -60px;
  border-radius: 100% 0 0 0;
}

/* Bande d'appel arrondie : hachures en haut a droite, disque corail en bas */
.ncn-deco-bande::before {
  width: 120px; height: 120px;
  right: 120px; bottom: -50px;
  border-radius: 100% 0 0 0;
  background: #EB5A5D;
}
.ncn-deco-bande::after {
  width: 180px; height: 180px;
  right: -30px; top: -40px;
  border-radius: 100% 0 0 0;
  transform: rotate(180deg);
}

@media (max-width: 767px) {
  .ncn-deco-hero::before { width: 300px; height: 300px; right: -120px; top: -90px; }
  .ncn-deco-hero::after { width: 100px; height: 100px; left: -30px; bottom: 30px; }
  .ncn-deco-bande::before,
  .ncn-deco-corail::before,
  .ncn-deco-bleu::before { display: none; }
}

/* --- Menu mobile Xpro : remplissage ET hauteur des icones SVG ------------ */
button.xpro-elementor-horizontal-menu-toggler svg,
button.xpro-elementor-horizontal-menu-close svg {
  width: 24px;
  height: 24px;
  display: block;
  flex: 0 0 auto;
  fill: currentColor;
}

/* --- Menu mobile Xpro : remplissage ET hauteur des icones SVG ------------
   Le panneau Elementor pose "color" sur le bouton, mais l'icone est un SVG
   dont ni le remplissage ni la hauteur ne sont definis : sans fill il restait
   noir, et sans hauteur explicite il s'ecrasait a zero dans le conteneur
   flex, laissant un rectangle vide.
   ------------------------------------------------------------------------- */
button.xpro-elementor-horizontal-menu-toggler svg,
button.xpro-elementor-horizontal-menu-close svg {
  width: 24px;
  height: 24px;
  display: block;
  flex: 0 0 auto;
  fill: currentColor;
}
button.xpro-elementor-horizontal-menu-close svg { width: 22px; height: 22px; }

/* Transition douce. Ne jamais toucher a "display" du bouton : Xpro garde la
   croix en display:none tant que le panneau mobile est ferme. */
button.xpro-elementor-horizontal-menu-toggler,
button.xpro-elementor-horizontal-menu-close {
  transition: background-color 180ms ease, color 180ms ease;
}

/* --- Panneau mobile : intitules alignes a gauche -------------------------
   Xpro impose text-align:right au panneau, ce qui plaque les entrees du menu
   contre le bord droit.
   ------------------------------------------------------------------------- */
.xpro-elementor-horizontal-menu-responsive-tablet,
.xpro-elementor-horizontal-menu-responsive-mobile {
  text-align: left;
}
.xpro-elementor-horizontal-menu-responsive-tablet .xpro-elementor-horizontal-menu-close,
.xpro-elementor-horizontal-menu-responsive-mobile .xpro-elementor-horizontal-menu-close {
  margin-left: auto;
}

/* --- En-tete : ordre des blocs sur tablette et mobile --------------------
   Les trois blocs sont enfants de .e-con-inner, et le menu est un widget et
   non un conteneur : les selecteurs doivent viser ce niveau exact.

   Tablette (<= 1024) : logo a gauche, bouton d'appel puis hamburger a droite,
   sur une seule ligne.
   Mobile (<= 767)    : logo et hamburger sur la premiere ligne, bouton d'appel
   en pleine largeur sur la seconde.
   ------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  #entete-site > .e-con-inner {
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px;
  }
  #entete-site > .e-con-inner > .e-con:first-child { order: 1; flex: 0 0 auto; }
  #entete-site > .e-con-inner > .e-con:last-child  { order: 2; margin-left: auto; flex: 0 0 auto; }
  #entete-site > .e-con-inner > .elementor-widget-xpro-horizontal-menu {
    order: 3;
    flex: 0 0 auto;
    width: auto;
  }
}

@media (max-width: 767px) {
  #entete-site > .e-con-inner { flex-wrap: wrap; }
  #entete-site > .e-con-inner > .elementor-widget-xpro-horizontal-menu {
    order: 2;
    margin-left: auto;
  }
  #entete-site > .e-con-inner > .e-con:last-child {
    order: 3;
    width: 100%;
    margin: 10px 0 0;
  }
  #entete-site > .e-con-inner > .e-con:last-child .e-con-inner,
  #entete-site > .e-con-inner > .e-con:last-child .elementor-widget-button,
  #entete-site > .e-con-inner > .e-con:last-child .elementor-button {
    width: 100%;
  }
  #entete-site > .e-con-inner > .e-con:last-child .elementor-button {
    justify-content: center;
  }
}

/* --- Reseaux sociaux : nom accessible conserve, libelle masque visuellement -- */
.xpro-social-icon-title {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Accordeon FAQ : indicateur lisible ----------------------------------- */
.e-n-accordion details > summary { cursor: pointer; }

/* --- Mouvement reduit ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ncn-carte:hover { transform: none; }
}

/* --- Impression ------------------------------------------------------------ */
@media print {
  .xpro-theme-builder-header,
  #xpro-theme-builder-footer { display: none !important; }
}
