/*
Theme Name: Nopow-Agency
Theme URI: https://nopow-agency.com/
Author: Nopow-Agency
Author URI: https://nopow-agency.com/
Description: Theme Wrodpress vierge destiné à créer un site de zéro via l'éditeur Gutenberg.
Requires at least: 6.6
Tested up to: 6.6
Requires PHP: 7.0
Version: 1.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nopow-agency
Tags: nopow-agency
*/

.na-slide-nav {
  /* distance du slide */
  position: sticky;
  top: 0;
  z-index: 9999;
}

@supports (animation-timeline: view()) {
  .na-slide-nav {
    --animationStartsAfter: 50vh;
    --animationDistance:500px;
    --slide-distance: 0px;

    /* Animation moderne si support */
    animation: stickyNav linear forwards;
    animation-timeline: view();
    animation-range-start: calc(100vh + var(--animationStartsAfter));
    animation-range-end: calc(100vh + var(--animationStartsAfter) + var(--animationDistance));    
  }
}


@keyframes stickyNav {
  0% {
    transform: translateY(-100%);

    position: fixed;
    width: 100%;
    z-index: 99999;
  }
  100% {
    top: 0;

    position: fixed;
    width: 100%;
    z-index: 99999;
  }
}

.wp-block-navigation__responsive-container.is-menu-open {
  height: 80vh;
}

/* =============================================
   Kadence Advanced Form — Messages sémantiques
   ============================================= */

/* Base commune */
.kb-adv-form-message {
  border-radius: 6px;
  padding: 12px 16px;
  border-width: 1px;
  border-style: solid;
}

/* Succès */
.kb-adv-form-message.kb-adv-form-success {
  background: #EAF9EC;
  border-color: #29BD40;
  color: #29BD40;
}

/* Erreur globale */
.kb-adv-form-message.kb-adv-form-warning {
  background: #F9E8EB;
  border-color: #BF1130;
  color: #BF1130;
}

/* Erreurs de validation par champ */
.kb-adv-form-field-errors .kb-adv-form-error-msg,
.kb-adv-form-field-errors .kb-adv-form-error-title {
  color: #BF1130;
}

/* =================================================================
   Nopow Agency — Compléments du design system
   Variables générées par WordPress depuis theme.json :
     couleurs     var(--wp--preset--color--{slug})        ex. --ink, --indigo, --sky
     dégradé      var(--wp--preset--gradient--nopow-gradient)
     espacements  var(--wp--preset--spacing--{10..100})   ex. --100 = 128px
     custom       var(--wp--custom--radius--md), --shadow--glow,
                  --glass--fill / --glass--blur / --glass--border,
                  --motion--ease-out / --motion--dur-base, --letter-spacing--caps
   Ne couvre que ce qui n'est PAS exprimable via theme.json / réglages Kadence.
   ================================================================= */

/* --- Transitions globales (motion) --- */
a,
.wp-block-button__link,
.wp-element-button,
.kb-button,
.kt-blocks-accordion-header-wrap {
  transition: transform var(--wp--custom--motion--dur-base, 240ms) var(--wp--custom--motion--ease-out, ease-out),
              filter   var(--wp--custom--motion--dur-base, 240ms) var(--wp--custom--motion--ease-out, ease-out),
              color    var(--wp--custom--motion--dur-fast, 140ms) var(--wp--custom--motion--ease-out, ease-out),
              background var(--wp--custom--motion--dur-base, 240ms) var(--wp--custom--motion--ease-out, ease-out);
}

/* --- Lien : hover plus clair --- */
a:hover { color: var(--wp--preset--color--paper); }

/* --- Bouton « primary » : dégradé signature + glow indigo ---
   Style de bloc .is-style-nopow-primary (enregistré dans functions.php).
   Repli si le rendu Kadence advancedbtn n'applique pas le dégradé. */
.is-style-nopow-primary .wp-block-button__link,
.wp-block-button.is-style-nopow-primary > .wp-block-button__link,
a.is-style-nopow-primary,
.is-style-nopow-primary .kb-button {
  background: var(--wp--preset--gradient--nopow-gradient) !important;
  color: var(--wp--preset--color--paper) !important;
  border: 0 !important;
  border-radius: var(--wp--custom--radius--md, 16px) !important;
  box-shadow: var(--wp--custom--shadow--glow, 0 10px 30px rgba(99,102,241,.35));
  font-weight: 600;
}
.is-style-nopow-primary .wp-block-button__link:hover,
.wp-block-button.is-style-nopow-primary > .wp-block-button__link:hover,
a.is-style-nopow-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

/* --- Bouton « solid » indigo plat --- */
.is-style-nopow-solid .wp-block-button__link,
.wp-block-button.is-style-nopow-solid > .wp-block-button__link {
  background: var(--wp--preset--color--indigo);
  color: var(--wp--preset--color--paper);
  border-radius: var(--wp--custom--radius--md, 16px);
  font-weight: 600;
}
.is-style-nopow-solid .wp-block-button__link:hover { transform: translateY(-2px); filter: brightness(1.08); }

/* --- Bouton « ghost » contour Sky --- */
.is-style-nopow-ghost .wp-block-button__link,
.wp-block-button.is-style-nopow-ghost > .wp-block-button__link {
  background: transparent;
  color: var(--wp--preset--color--sky);
  border: 1px solid var(--wp--preset--color--sky);
  border-radius: var(--wp--custom--radius--md, 16px);
}

/* --- Eyebrow (T6) : sur-titre MAJUSCULES Sky --- */
.nopow-eyebrow {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--wp--custom--letter-spacing--caps, .08em);
  color: var(--wp--preset--color--sky);
}

/* --- Glass card : verre flouté (UNIQUEMENT sur le dégradé) ---
   Classe .nopow-glass sur un group / row Kadence. */
.nopow-glass {
  background: var(--wp--custom--glass--fill, rgba(255,255,255,.08)) !important;
  -webkit-backdrop-filter: var(--wp--custom--glass--blur, blur(8px));
  backdrop-filter: var(--wp--custom--glass--blur, blur(8px));
  border: var(--wp--custom--glass--border, 1px solid rgba(255,255,255,.18)) !important;
  border-radius: var(--wp--custom--radius--sm, 12px);
}

/* --- Carte standard sur sombre --- */
.nopow-card {
  background: var(--wp--preset--color--ink-800);
  border: 1px solid var(--wp--preset--color--ink-600);
  border-radius: var(--wp--custom--radius--lg, 20px);
  box-shadow: var(--wp--custom--shadow--md);
}

/* --- Vignette projet : rayon lg --- */
.nopow-thumb img,
.nopow-thumb .wp-block-image img { border-radius: var(--wp--custom--radius--lg, 20px); }

/* --- Listes sans puce (menus du footer, listes de features) --- */
.wp-block-list.is-style-none {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --- Champs de formulaire Kadence : style néomorphique sur navy --- */
.kb-adv-form input[type="text"],
.kb-adv-form input[type="email"],
.kb-adv-form input[type="tel"],
.kb-adv-form textarea,
.wp-block-kadence-advanced-form input:not([type="submit"]),
.wp-block-kadence-advanced-form textarea {
  background: var(--wp--preset--color--ink-700) !important;
  color: var(--wp--preset--color--paper) !important;
  border: 1px solid var(--wp--preset--color--ink-600) !important;
  border-radius: var(--wp--custom--radius--md, 16px) !important;
  box-shadow: var(--wp--custom--shadow--input) !important;
}
.kb-adv-form input::placeholder,
.kb-adv-form textarea::placeholder { color: var(--wp--preset--color--grey-400); }
.kb-adv-form input:focus,
.kb-adv-form textarea:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,.45) !important;
}

/* --- Focus visible (accessibilité) --- */
:where(a, button, .wp-element-button, input, textarea):focus-visible {
  outline: 2px solid var(--wp--preset--color--indigo);
  outline-offset: 2px;
}

/* --- prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}