/*
Theme Name:  Doggo_lab
Theme URI:   https://doggo-canin.fr
Author:      Romain Costes
Description: Thème sur mesure de Doggo_lab, cabinet de comportement canin de Marie Rivière-Agnus. Direction artistique « dossier clinique / carnet de terrain ». Contenu piloté par Advanced Custom Fields, sans constructeur de pages.
Version:     1.0.0
Requires at least: 6.5
Requires PHP: 8.1
License:     GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: doggolab
*/

/* ==========================================================================
   COUCHE 1 — Fondations
   Jetons de design, remise à zéro, typographie, gabarit.
   Les composants sont dans css/composants.css, l'en-tête et le pied dans
   css/entete-pied.css. Ne rien ajouter ici qui concerne un composant.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. JETONS
   -------------------------------------------------------------------------- */

:root {
  /* Palette. Ne jamais introduire de couleur hors de cette liste. */
  --papier:       #F5F2EA;
  --papier-fonce: #ECE7DB;
  --encre:        #101C16;
  --foret:        #123625;
  --vert-signal:  #23C45F;
  --vert-fonce:   #189249;
  --ardoise:      #4B5C55;

  /* Déclinaisons transparentes de la palette, pour ne pas multiplier les
     valeurs en dur dans les composants. */
  --trait-encre:   rgba(16, 28, 22, 0.12);
  --trait-encre-f: rgba(16, 28, 22, 0.14);
  --trait-papier:  rgba(245, 242, 234, 0.18);
  --texte-papier:  rgba(245, 242, 234, 0.78);
  --texte-papier-attenue: rgba(245, 242, 234, 0.5);

  /* Typographies */
  --font-titre: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-corps: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-label: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Rythme vertical */
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --gutter:    clamp(1.25rem, 5vw, 4rem);
  --measure:   68ch;

  --radius: 4px;

  /* Étoile des avis, en masque CSS : aucune image à charger, aucun glyphe dont
     le dessin varie d'une plateforme à l'autre. */
  --etoile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.26 6.85.72-5.1 4.6 1.44 6.72L12 16.9 5.91 20.3l1.44-6.72-5.1-4.6 6.85-.72z'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   2. REMISE À ZÉRO
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

img, picture, svg, video { max-width: 100%; display: block; }

button, input, textarea, select { font: inherit; color: inherit; }

html { -webkit-text-size-adjust: 100%; }

/* --------------------------------------------------------------------------
   3. BASE
   -------------------------------------------------------------------------- */

body {
  font-family: var(--font-corps);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--encre);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-titre);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.75rem);
  font-variation-settings: 'SOFT' 20, 'WONK' 1;
}

h2 {
  font-size: clamp(1.875rem, 4vw, 2.875rem);
  font-variation-settings: 'SOFT' 20, 'WONK' 1;
}

h3 {
  font-size: 1.3125rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p { max-width: var(--measure); }

a { color: inherit; }

strong { font-weight: 600; }

::selection { background: var(--vert-signal); color: var(--encre); }

/* --------------------------------------------------------------------------
   4. GABARIT
   -------------------------------------------------------------------------- */

.contenu {
  width: min(100% - (var(--gutter) * 2), 1200px);
  margin-inline: auto;
}

.contenu--etroit {
  width: min(100% - (var(--gutter) * 2), 760px);
  margin-inline: auto;
}

.section { padding-block: var(--section-y); }

.section--encre       { background: var(--encre);       color: var(--papier); }
.section--foret       { background: var(--foret);       color: var(--papier); }
.section--papier-fonce { background: var(--papier-fonce); }

/* Deux sections de même fond qui se suivent : on supprime la couture pour
   qu'elles se lisent comme un seul aplat plutôt que comme deux blocs collés. */
.section--encre + .section--encre,
.section--foret + .section--foret,
.section--papier-fonce + .section--papier-fonce { padding-top: 0; }

/* Soudure explicite, cochée dans l'administration : un bloc qui prolonge le
   précédent plutôt que d'ouvrir un nouveau temps de lecture. */
.section--soudee { padding-top: 0; }

/* --------------------------------------------------------------------------
   5. ACCESSIBILITÉ
   -------------------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--vert-signal);
  outline-offset: 3px;
}

.saut-contenu {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--encre);
  color: var(--papier);
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.saut-contenu:focus { left: 0; }

/* Réservé aux lecteurs d'écran. */
.lecteur-seul {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   6. MOUVEMENT RÉDUIT
   -------------------------------------------------------------------------- */

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

/* --------------------------------------------------------------------------
   7. IMPRESSION
   -------------------------------------------------------------------------- */

@media print {
  .entete, .cta-final, .btn, .nav-bascule, .pied { display: none; }
  body { background: #fff; color: #000; }
  .section--encre, .section--foret { background: #fff; color: #000; }
  .section { padding-block: 1.5rem; }
}
