/**
Theme Name: Hypp agency
Author: Hypp Agency
Description: Thème enfant Astra du site Hypp Agency : page d'accueil, modèle d'article de blog et page contact.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hypp-agency
Template: astra
*/

/* ==========================================================================
   Organisation des styles
   style.css         — chargé partout : variables, base, composants partagés
                       (conteneur, navigation, boutons, FAQ, pied de page)
                       et mouvement réduit.
   assets/css/home.css      — accueil (.hypp-home)
   assets/css/blog.css      — articles (.hypp-blog)
   assets/css/service.css   — fiches du type Service (.hypp-service)
   assets/css/contact.css   — contact (.hypp-contact)
   assets/css/blog-home.css — page Blog et catégories (.hypp-blog-home, avec blog.css)
   assets/css/sections.css  — blocs newsletter (.hypp-newsletter) et CTA projet (.hypp-cta)
   Les feuilles de page sont chargées après style.css (dépendance déclarée
   dans functions.php) : à spécificité égale, elles l'emportent.
   ========================================================================== */


/* ==========================================================================
   00 — Socle commun
   ========================================================================== */

/* Palette unique : la modifier ici met à jour les trois gabarits.
   .hypp-faq, .hypp-newsletter et .hypp-cta la reçoivent aussi : leurs blocs peuvent être posés
   dans n'importe quel contenu Gutenberg (styles des deux derniers : assets/css/sections.css). */
.hypp-home,
.hypp-blog,
.hypp-contact,
.hypp-service,
.hypp-faq,
.hypp-newsletter,
.hypp-cta {
  --bg: oklch(99% 0.003 150);
  --bg-glass: oklch(99% 0.003 150 / .8);
  --gray: oklch(96.5% 0.004 150);
  --ink: oklch(20% 0.02 160);
  --ink-soft: oklch(46% 0.015 160);
  --line: oklch(90% 0.006 150);
  --accent: oklch(48% 0.11 160);
  --accent-dark: oklch(38% 0.09 162);
  --accent-soft: oklch(93% 0.05 160);
  --dark: oklch(18% 0.025 165);
  --dark-2: oklch(24% 0.03 165);
  --mint: oklch(86% 0.12 160);
  --on-dark-soft: oklch(80% 0.02 160);
}

/* Le bloc FAQ hérite de la police et du fond du contenu qui l'accueille. */
.hypp-home,
.hypp-blog,
.hypp-contact,
.hypp-service {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist', -apple-system, system-ui, sans-serif;
  letter-spacing: -.01em;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

:is(.hypp-home, .hypp-blog, .hypp-contact, .hypp-service) *,
:is(.hypp-home, .hypp-blog, .hypp-contact, .hypp-service) *::before,
:is(.hypp-home, .hypp-blog, .hypp-contact, .hypp-service) *::after {
  box-sizing: border-box;
}

/* Remise à zéro de l'accueil Gutenberg : doit précéder tous les composants. */
.hypp-home {
  width: 100%;
  max-width: none !important;
  padding: 0 !important;
}

.hypp-home * {
  margin: 0;
  padding: 0;
}

.hypp-home .wp-block-group {
  margin: 0;
  padding: 0;
}

:is(.hypp-home, .hypp-blog) p {
  text-wrap: pretty;
}

:is(.hypp-home, .hypp-blog) :is(a, button, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.hypp-contact :is(a, button, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}


/* ==========================================================================
   01 — Composants partagés
   ========================================================================== */

/* Conteneur */
:is(.hypp-home, .hypp-blog, .hypp-contact, .hypp-service) .wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation principale (accueil + blog) */
:is(.hypp-home, .hypp-blog) .gnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

body.admin-bar :is(.hypp-home, .hypp-blog) .gnav {
  top: 32px;
}

:is(.hypp-home, .hypp-blog) .gnav nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

:is(.hypp-home, .hypp-blog) .gnav .logo {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.04em;
}

/* Boutons « pill » (accueil + blog + CTA projet) */
:is(.hypp-home, .hypp-blog, .hypp-cta, .hypp-service) .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border: 0;
  border-radius: 980px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
}

:is(.hypp-home, .hypp-blog) .pill-dark {
  background: var(--ink);
  color: #fff;
}

:is(.hypp-home, .hypp-blog, .hypp-cta, .hypp-service) .pill-mint {
  background: var(--mint);
  color: var(--dark);
}

:is(.hypp-home, .hypp-blog) .pill-sm {
  font-size: 12px;
  padding: 6px 14px;
}

/* Titres de section (accueil + contact) */
:is(.hypp-home, .hypp-contact) .sec-title {
  margin-bottom: 56px;
  text-align: center;
}

:is(.hypp-home, .hypp-contact) .sec-title h2 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
}

/* Questions fréquentes : blocs Détails de l'accueil (.faq2) et composant .hypp-faq
   (template-parts/faq.php, utilisé par les gabarits PHP et le bloc ACF « FAQ Hypp »).
   --section : bandeau pleine largeur ; --block : dans le flux d'un contenu Gutenberg. */
:is(.hypp-home .faq2, .hypp-faq--section) {
  padding: 110px 0;
}

:is(.hypp-home .faq2, .hypp-faq--section) .list {
  max-width: 820px;
  margin: 0 auto;
}

.hypp-faq--block {
  margin-block: 48px;
}

.hypp-faq--block .list {
  border-top: 1px solid var(--line);
}

:is(.hypp-home .faq2, .hypp-faq) details {
  border-bottom: 1px solid var(--line);
}

:is(.hypp-home .faq2, .hypp-faq) summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.025em;
  list-style: none;
  cursor: pointer;
}

:is(.hypp-home .faq2, .hypp-faq) summary::-webkit-details-marker {
  display: none;
}

a{
	text-decoration: none !important;
}

/* Le second « content » masque le symbole aux lecteurs d'écran. */
:is(.hypp-home .faq2, .hypp-faq) summary::after {
  content: '+';
  content: '+' / '';
  color: var(--accent);
  font-size: 26px;
  font-weight: 400;
  transition: transform .25s;
}

:is(.hypp-home .faq2, .hypp-faq) details[open] summary::after {
  transform: rotate(45deg);
}

.hypp-faq summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.hypp-faq--block summary {
  padding: 20px 0;
  font-size: 19px;
}

.hypp-faq .faq-answer {
  max-width: 680px;
  padding: 0 0 26px;
  color: var(--ink-soft);
  font-size: 17px;
}

.hypp-faq .faq-answer p {
  margin: 0 0 12px;
}

/* Les contenus (articles) donnent une marge basse à leurs paragraphes : pas d'espace en trop sous la réponse. */
.hypp-faq .faq-answer > :last-child {
  margin-bottom: 0;
}

/* Pied de page (accueil + blog) */
:is(.hypp-home, .hypp-blog) .foot2 {
  padding-block: 20px 26px;
  background: var(--gray);
  color: var(--ink-soft);
  font-size: 12px;
}

:is(.hypp-home, .hypp-blog) .foot2 .wrap {
  max-width: 1000px;
}

:is(.hypp-home, .hypp-blog) .foot2 .cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}

:is(.hypp-home, .hypp-blog) .foot2 h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

:is(.hypp-home, .hypp-blog) .foot2 ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

:is(.hypp-home, .hypp-blog) .foot2 a {
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

:is(.hypp-home, .hypp-blog) .foot2 .bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
}

@media (max-width: 900px) {

  :is(.hypp-home, .hypp-blog) .foot2 .cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Hauteur de la barre d'administration WordPress (46 px ≤ 782 px, non fixe ≤ 600 px) */
@media (max-width: 782px) {

  body.admin-bar :is(.hypp-home, .hypp-blog) .gnav {
    top: 46px;
  }
}

@media (max-width: 600px) {

  body.admin-bar :is(.hypp-home, .hypp-blog) .gnav {
    top: 0;
  }
}

@media (max-width: 560px) {

  .hypp-faq summary {
    font-size: 18px;
  }
}




/* ==========================================================================
   99 — Mouvement réduit (gabarits et blocs, pseudo-éléments compris)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

  :is(.hypp-home, .hypp-blog, .hypp-contact, .hypp-faq, .hypp-newsletter, .hypp-cta) *,
  :is(.hypp-home, .hypp-blog, .hypp-contact, .hypp-faq, .hypp-newsletter, .hypp-cta) *::before,
  :is(.hypp-home, .hypp-blog, .hypp-contact, .hypp-faq, .hypp-newsletter, .hypp-cta) *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
