/* ========================= /assets/css/styles.css =========================
   Palette, typographies, layout, composants. Optimisé pour:
   - Moins de CLS liés aux webfonts (font-size-adjust + line-height fixes)
   - Logo dimensionné et réservé (56x56)
   - Navigation mobile stable
   - Bannière cookie fixée au viewport
============================================================================ */

/* ---------- Thème & variables ---------- */
:root {
  /* Palette bleue-sarcelle (calme & claire) */
  --brand:    #008080;
  --brand-600:#006666;
  --accent:   #A7E9E1;

  --bg:       #F6F8F9;
  --surface:  #FFFFFF;
  --text:     #1F2A2E;
  --muted:    #5F6B73;
  --line:     #E3E8EB;

  --radius:   14px;
  --shadow:   0 10px 30px rgba(0,0,0,0.06);

  /* Typo sizing */
  --lh-body:  1.6;
  --lh-head:  1.2;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);

  /* Anti-CLS : on stabilise la métrique en attendant Inter */
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size-adjust: 0.5;   /* Inter ≈ 0.5 : réduit l’écart visuel avec la fallback */
  line-height: var(--lh-body);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }
.container { width: min(1100px, 92%); margin: 0 auto; }

/* Focus visibles pour l’accessibilité */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Texte secondaire marqué */
.muted { color: var(--muted); }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: var(--muted); }

/* Légende de marque (petit vert harmonisé) */
.brand-caption {
  color: var(--brand);
  font-weight: 600;
}

/* ---------- Titres (Playfair) : ligne fixe pour éviter les sauts à l’arrivée des WOFF2 ---------- */
h1, h2, h3, .brand-name {
  font-family: "Playfair Display", Georgia, serif;
  line-height: var(--lh-head);
  margin: 0 0 .5rem;
}

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky; top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  z-index: 50;
}
.nav-inner {
  display: flex; align-items: center; gap: 1rem;
  padding: .8rem 0;
}
.brand-name.full { display: inline; }
.brand-name.short { display: none; }
.brand-name { font-size: 1.15rem; line-height: 56px; display: inline-block; vertical-align:middle;}
.brand-mark { background: var(--brand); color: #fff; padding: .2rem .5rem; border-radius: 8px; font-size: .9rem; letter-spacing: .5px; }

/* Logo stabilisé (évite le reflow) — aligne avec width/height HTML = 56 */
.brand-logo {
  width: 56px;
  height: 56px;
  display: inline-block;
  vertical-align: middle;
}

/* Menu */
.nav-toggle { display: none; }
.nav-menu {
  margin: 0 0 0 auto; padding: 0;
  list-style: none;
  display: flex; gap: 1rem; align-items: center;
}
.nav-menu a { padding: .5rem .7rem; border-radius: 10px; }
.nav-menu a.active { background: var(--bg); }
.nav-menu a {
  font-size: 1rem;        
  line-height: 1.5;       
}

/* ---------- Mobile nav ---------- */
@media (max-width: 780px) {
  .nav-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;   /* gauche / centre / droite */
    align-items: center;
    position: relative; /* repère pour menu absolu */
  }
  .brand-logo-link { justify-self: start; }
  .nav-toggle { justify-self: center; display: block; background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: .4rem .6rem; }
  .brand-name.full { display: none; }
  .brand-name.short { display: inline; justify-self: end; }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: .4rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .6rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 260px;
    z-index: 100;
  }
  .nav-menu.open { display: flex; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  padding: .8rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
}
.btn-primary { background: var(--brand); color: #fff; transition: background .2s ease; }
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-outline { background: transparent; border-color: var(--brand); color: var(--brand); }
.btn-outline:hover { border-color: var(--brand-600); color: var(--brand-600); }

/* ---------- Héros / en-tête ---------- */
.hero {
  padding: 4.5rem 0 3rem;
  background: linear-gradient(180deg, #ffffff 0%, #f6f8f9 100%);
  border-bottom: 1px solid var(--line);
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); margin: 0 0 1rem; }
.lead { color: var(--muted); max-width: 65ch; }
.hero-cta { margin-top: 1.4rem; display: flex; gap: .8rem; flex-wrap: wrap; }

/* ---------- Sections / Grilles / Cartes ---------- */
.section { padding: 3rem 0; }
.section h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 1rem; }

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 780px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

/* ---------- Articles (listes) ---------- */
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; transition: transform .15s ease; }
.post:hover { transform: translateY(-2px); }
.post .post-title { font-weight: 700; margin: .2rem 0 .5rem; }
.post .post-meta  { font-size: .85rem; color: var(--muted); }

/* ---------- Blocs de contenu ---------- */
.section-block { margin-bottom: 2.5rem; }
.section-block h2 { margin-top: 0; border-left: 4px solid var(--brand); padding-left: .6rem; }
.highlight-box {
  background: var(--accent);
  padding: 1rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}
.highlight-box p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 3rem; border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  padding: 2rem 0;
}
.footer-bottom { padding: 1rem 0; border-top: 1px solid var(--line); color: var(--muted); }

/* ---------- Cookie banner (fixée au viewport, non bloquante) ---------- */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 12px;
  padding: .9rem;
  width: min(700px, calc(100% - 32px));
  z-index: 9999;
}
/* C’est SEULEMENT l’attribut [hidden] qui la masque */
.cookie-banner[hidden] { display: none !important; }

/* ---------- Utilitaires ---------- */
.brand-link { text-decoration: underline; text-underline-offset: 2px; }
.brand-link:hover { color: var(--brand-600); }

hr {
  border: 0; height: 1px; background: var(--line);
  margin: 1rem 0;
}

/* Réduction du mouvement si le système le demande */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---- Normalisation des titres pour éviter le warning H1UserAgentFontSizeInSection ---- */
/* On fixe familles, tailles et interlignages pour ne plus dépendre du User Agent CSS */
h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.2;
  margin: 0 0 .5rem;
}

/* Échelles fluides raisonnables (mobile → desktop) */
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3.2vw, 2.0rem); }
h3 { font-size: clamp(1.2rem, 2.6vw, 1.4rem); }
h4 { font-size: clamp(1.05rem, 2.1vw, 1.2rem); }
h5 { font-size: 1rem; }
h6 { font-size: .95rem; }

/* Option : si tu veux garder ton gros titre seulement dans le héros */
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); } /* déjà présent chez toi, on le laisse */
/* Carte "Infos pratiques" avec photo intégrée */
.info-card {
  display: grid;
  grid-template-columns: 180px 1fr; /* photo | contenu */
  gap: 1rem;
  align-items: center;
}
.info-card figure { margin: 0; text-align: center; }
.info-card img {
  width: 180px; height: 180px; object-fit: cover;
  border-radius: 9999px; box-shadow: var(--shadow);
  display: block; margin: 0 auto;
}
.info-card h3 { margin-top: 0; } /* évite un espace inutile */
.info-card .brand-caption { display:block; margin-top:.5rem; text-align:center; }

/* un peu plus de place entre les 2 colonnes principales */
.grid-2--about { gap: 2rem; }

@media (max-width: 780px) {
  .info-card { grid-template-columns: 1fr; }  /* pile : photo au-dessus du texte */
}
/* Champ de formulaire cohérent avec le site */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.form-field label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-700, #333);
}

.form-field input,
.form-field textarea {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line, #ddd);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--brand-600, #4f46e5);
  box-shadow: 0 0 0 2px rgba(79,70,229,0.15);
  outline: none;
}

#invoice-form h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-600, #4f46e5);
}



