/* ==========================================================================
   FONDATION PSAUMES 23 — Feuille de style
   Mobile-first. Couleurs issues du logo officiel.
   ========================================================================== */

:root {
  /* Couleurs de l'identité */
  --bleu: #113EA2;        /* bleu du logo */
  --nuit: #0B1F5E;        /* bleu nuit, textes forts et fonds profonds */
  --or: #FECF06;          /* jaune du logo, utilisé comme « lumière » */
  --brume: #EEF2FB;       /* fond doux */
  --encre: #16204A;       /* texte courant */
  --encre-douce: #4A5478; /* texte secondaire */
  --blanc: #FFFFFF;
  --trait: #D6DEF2;

  /* Typographie */
  --police-titre: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --police-texte: "Newsreader", Georgia, "Times New Roman", serif;

  /* Échelle typographique (rapport 1,25) */
  --t-petit: 0.875rem;
  --t-base: 1rem;
  --t-m: 1.25rem;
  --t-l: 1.5625rem;
  --t-xl: clamp(2rem, 9vw, 3.05rem);

  --colonne: 36rem;
  --rayon: 14px;
  --espace: clamp(3rem, 10vw, 4.5rem);

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--blanc);
  color: var(--encre);
  font-family: var(--police-titre);
  font-size: var(--t-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--bleu); }
p { margin: 0; }

.colonne {
  width: 100%;
  max-width: var(--colonne);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Accessibilité */
.evitement {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--nuit); color: var(--blanc);
  padding: .75rem 1rem; border-radius: 8px; font-weight: 600;
}
.evitement:focus { top: calc(1rem + env(safe-area-inset-top, 0px)); }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; border-radius: 6px; }
.section-nuit :focus-visible, .section-bleu :focus-visible, .pied :focus-visible { outline-color: var(--or); }

.visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero {
  padding: calc(2rem + env(safe-area-inset-top, 0px)) 0 var(--espace);
  text-align: center;
}
.hero-logo {
  width: min(100%, 24rem);
  height: auto;
  margin: 0 auto;
}
.hero-slogan {
  margin: 1.75rem auto 0;
  max-width: 20em;
  font-family: var(--police-texte);
  font-style: italic;
  font-size: 1.375rem;
  line-height: 1.4;
  color: var(--nuit);
}
.hero-actions {
  display: grid;
  gap: .75rem;
  margin-top: 2rem;
}

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 3.25rem;
  padding: .8rem 1.25rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 600 var(--t-base)/1.2 var(--police-titre);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.bouton-emoji { font-size: 1.15em; line-height: 1; }
.bouton-plein { background: var(--bleu); color: var(--blanc); }
.bouton-plein:hover { background: var(--nuit); }
.bouton-contour { background: transparent; color: var(--bleu); border-color: var(--bleu); }
.bouton-contour:hover { background: var(--brume); }
.bouton-or { background: var(--or); color: var(--nuit); }
.bouton-or:hover { background: #FFE15C; }
.bouton-clair { background: transparent; color: var(--blanc); border-color: rgba(255,255,255,.7); }
.bouton-clair:hover { background: rgba(255,255,255,.1); border-color: var(--blanc); }
.bouton-large { width: 100%; }

/* ---------- Sections ---------- */
.section { padding: var(--espace) 0; }
.section-brume { background: var(--brume); }
.section-nuit { background: var(--nuit); color: var(--blanc); }
.section-bleu { background: var(--bleu); color: var(--blanc); }

.titre-section {
  margin: 0 0 1.5rem;
  font-size: var(--t-l);
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.15;
  color: var(--nuit);
}
.section-nuit .titre-section, .section-bleu .titre-section { color: var(--blanc); }

/* Présentation */
.recit p {
  font-family: var(--police-texte);
  font-size: 1.1875rem;
  line-height: 1.65;
  max-width: 34em;
}
.recit p + p { margin-top: 1.1em; }
.recit p:first-child::first-line { font-weight: 500; }

/* ---------- Valeurs : l'emblème et ses six points ---------- */
.valeurs-embleme {
  width: min(62%, 15rem);
  margin: 0 auto 2.25rem;
}
.valeurs-embleme svg { width: 100%; height: auto; overflow: visible; }
.valeurs-embleme .point {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .35s cubic-bezier(.3,1.5,.5,1), opacity .35s ease;
}
.valeurs-embleme .halo {
  fill: none;
  stroke: var(--or);
  stroke-width: 10;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity .3s ease, transform .4s ease;
  transform: scale(.8);
}
.valeurs-embleme .point.eteint { opacity: .18; transform: scale(.6); }
.valeurs-embleme .point.actif { transform: scale(1.18); }
.valeurs-embleme .halo.actif { opacity: 1; transform: scale(1.55); }

.valeurs-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 1.25rem;
}
.valeur {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: .6rem;
  align-items: baseline;
  padding: 0;
  margin: 0;
  background: none;
  border: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
}
.valeur-point {
  width: .7rem; height: .7rem;
  border-radius: 50%;
  background: var(--or);
  box-shadow: 0 0 0 2px var(--blanc), 0 0 0 3px #E8B800;
  transform: translateY(-.05rem);
}
.valeur-nom {
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--nuit);
}
.valeur-texte {
  grid-column: 2;
  margin-top: .25rem;
  font-size: var(--t-petit);
  line-height: 1.45;
  color: var(--encre-douce);
}
.valeur[aria-pressed="true"] .valeur-nom { color: var(--bleu); text-decoration: underline; text-decoration-color: var(--or); text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* ---------- Engagement ---------- */
.engagement-phrase {
  font-family: var(--police-texte);
  font-style: italic;
  font-size: var(--t-m);
  line-height: 1.45;
  color: #C9D4F5;
  margin-bottom: 2rem;
}
.engagements { list-style: none; margin: 0; padding: 0; }
.engagements li {
  position: relative;
  padding: 1.25rem 0 1.25rem 1.75rem;
  border-top: 1px solid rgba(255,255,255,.16);
}
.engagements li:last-child { border-bottom: 1px solid rgba(255,255,255,.16); }
.engagements li::before {
  content: "";
  position: absolute; left: 0; top: 1.82rem;
  width: .75rem; height: .75rem; border-radius: 50%;
  background: var(--or);
}
.engagements h3 {
  margin: 0 0 .35rem;
  font-size: var(--t-m);
  font-weight: 700;
  font-stretch: 108%;
}
.engagements p { color: #DCE3F8; line-height: 1.55; }

/* ---------- Liste de liens (réseaux, contacts) ---------- */
.liens { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.lien {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  gap: .9rem;
  padding: .85rem 1rem .85rem .85rem;
  min-height: 4.5rem;
  border-radius: var(--rayon);
  background: var(--blanc);
  border: 1.5px solid var(--trait);
  color: var(--encre);
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.section-brume .lien { border-color: transparent; }
.lien:hover { border-color: var(--bleu); }
.lien-icone {
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brume);
  font-size: 1.4rem;
}
.section-brume .lien-icone { background: #DFE6F8; }
.lien-texte { min-width: 0; }
.lien-titre { display: block; font-weight: 700; color: var(--nuit); }
.lien-detail {
  display: block;
  font-size: var(--t-petit);
  color: var(--encre-douce);
  overflow-wrap: anywhere;
}
.lien-action {
  font-size: var(--t-petit);
  font-weight: 600;
  color: var(--bleu);
  white-space: nowrap;
}
#enregistrer-contact { margin-top: 1.25rem; }

/* ---------- Communauté ---------- */
.communaute-intro { color: #DCE3F8; margin: -.5rem 0 1.75rem; font-size: 1.0625rem; }
.communaute-actions { display: grid; gap: .75rem; }

/* ---------- QR ---------- */
.qr { text-align: center; }
.qr .titre-section { text-align: left; }
.qr-carte { margin: 0 auto; max-width: 21rem; }
.qr-visuel svg { width: 100%; height: auto; }
.qr-visuel .qr-attente {
  aspect-ratio: 4 / 5;
  display: grid; place-items: center;
  padding: 1.5rem;
  border: 2px dashed var(--trait);
  border-radius: 24px;
  color: var(--encre-douce);
  font-size: var(--t-petit);
}
.qr-carte figcaption {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--nuit);
}
.qr-adresse {
  margin-top: .35rem;
  font-size: var(--t-petit);
  color: var(--encre-douce);
  overflow-wrap: anywhere;
}
.qr-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin-top: 1.75rem;
}
.qr-actions .bouton { font-size: .9rem; padding: .7rem .8rem; border-radius: 12px; }
.qr-message { min-height: 1.5rem; margin-top: .75rem; font-size: var(--t-petit); color: var(--bleu); font-weight: 600; }

/* ---------- Sections facultatives ---------- */
.grille-cartes { display: grid; gap: 1rem; }
.carte {
  background: var(--blanc);
  border-radius: var(--rayon);
  overflow: hidden;
  border: 1.5px solid var(--trait);
}
.section-brume .carte { border-color: transparent; }
.carte img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.carte-corps { padding: 1.1rem 1.2rem 1.3rem; }
.carte h3 { margin: 0 0 .35rem; font-size: var(--t-m); color: var(--nuit); }
.carte-date { font-size: var(--t-petit); color: var(--bleu); font-weight: 600; margin-bottom: .35rem; }
.carte p { color: var(--encre-douce); }
.carte a { display: inline-block; margin-top: .75rem; font-weight: 600; }
.galerie { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.galerie figure { margin: 0; }
.galerie img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.galerie figcaption { font-size: .8rem; color: var(--encre-douce); margin-top: .3rem; }
.equipe { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.equipe img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin-bottom: .6rem; }
.equipe strong { display: block; color: var(--nuit); }
.equipe span { font-size: var(--t-petit); color: var(--encre-douce); }

/* ---------- Pied de page ---------- */
.pied {
  background: var(--nuit);
  color: #C9D4F5;
  padding: 2.75rem 0 calc(2.75rem + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: var(--t-petit);
}
.pied strong { color: var(--blanc); font-size: 1rem; }
.pied-embleme { margin: 0 auto 1rem; width: 2.5rem; height: auto; background: var(--blanc); border-radius: 50%; padding: .4rem; box-sizing: content-box; }
.pied p + p { margin-top: .75rem; }
.pied-petit { opacity: .8; }
.pied a { color: var(--blanc); }

.sans-js { padding: 1rem; background: var(--brume); text-align: center; }

/* ---------- Écrans plus larges ---------- */
@media (min-width: 40rem) {
  .hero-actions { grid-template-columns: 1fr 1fr; }
  .grille-cartes { grid-template-columns: 1fr 1fr; }
  .galerie { grid-template-columns: repeat(3, 1fr); }
  .equipe { grid-template-columns: repeat(3, 1fr); }
  .valeurs-liste { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .hero-actions, .qr-actions, #enregistrer-contact, .evitement { display: none; }
  .section-nuit, .section-bleu, .pied { background: none; color: #000; }
}

/* ==========================================================================
   Kit QR Code (qr-studio.html)
   ========================================================================== */
.studio { background: var(--brume); }
.studio-tete { background: var(--blanc); padding: calc(1.5rem + env(safe-area-inset-top, 0px)) 0 1.75rem; border-bottom: 1px solid var(--trait); }
.studio-retour { display: inline-block; margin-bottom: 1rem; font-size: var(--t-petit); font-weight: 600; }
.studio-tete .titre-section { margin-bottom: .5rem; }
.studio-intro { color: var(--encre-douce); }
.studio-grille { display: grid; gap: 1.5rem; padding-top: 1.5rem; padding-bottom: 3rem; }
.studio-reglages, .studio-apercu { background: var(--blanc); border-radius: 18px; padding: 1.25rem; }
.champ { display: grid; gap: .4rem; margin-bottom: 1.25rem; }
.champ-titre { font-weight: 700; color: var(--nuit); padding: 0; }
.champ-aide { font-size: .8rem; color: var(--encre-douce); }
.champ input, .champ select {
  width: 100%; min-height: 3rem; padding: .6rem .8rem;
  border: 1.5px solid var(--trait); border-radius: 10px;
  font: 500 1rem var(--police-titre); color: var(--encre); background: var(--blanc);
}
.choix { border: 0; margin: 0 0 1.25rem; padding: 0; display: grid; gap: .5rem; }
.choix legend { margin-bottom: .5rem; }
.choix label { display: grid; grid-template-columns: auto 1fr; column-gap: .6rem; align-items: start; font-weight: 600; cursor: pointer; }
.choix input { margin-top: .3rem; accent-color: var(--bleu); width: 1.1rem; height: 1.1rem; }
.choix small { grid-column: 2; font-weight: 400; font-size: .8rem; color: var(--encre-douce); }
.studio-visuel svg { width: 100%; height: auto; max-height: 70vh; margin: 0 auto; }
.studio-infos { margin-top: .9rem; font-size: .8rem; color: var(--encre-douce); }
.studio-conseils { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--trait); }
.studio-conseils h2 { font-size: 1rem; margin: 0 0 .5rem; color: var(--nuit); }
.studio-conseils ul { margin: 0; padding-left: 1.1rem; font-size: .875rem; color: var(--encre-douce); }
.studio-conseils li + li { margin-top: .4rem; }
.bouton:disabled { opacity: .45; cursor: not-allowed; }
@media (min-width: 56rem) {
  .studio .colonne { max-width: 64rem; }
  .studio-grille { grid-template-columns: 22rem 1fr; align-items: start; }
}
