/* =========================================================
   MonQRCode.fr — feuille de style unique (mobile d'abord)
   Aucune ressource externe : polices système, icônes SVG inline.
   ========================================================= */

:root {
  --nuit: #1e293b;        /* bleu nuit : textes, fonds sombres */
  --bleu: #4f6ef7;        /* bleu de marque : accents décoratifs */
  --bleu-texte: #3b5bdb;  /* bleu assombri pour texte/boutons (contraste AA 5,7:1 sur blanc) */
  --bleu-fonce: #2f4ac0;
  --cyan: #22b8cf;        /* cyan : accents sur fond sombre uniquement */
  --fond: #f2f6fc;
  --blanc: #ffffff;
  --gris: #475569;        /* texte secondaire (7:1 sur fond clair) */
  --bord: #d8e0ec;
  --rayon: 14px;
  --ombre: 0 6px 24px rgba(30, 41, 59, .08);
  --police: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--police);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--nuit);
  background: var(--fond);
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .75rem; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 7vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p  { margin: 0 0 1rem; }

a { color: var(--bleu-texte); }
a:hover { color: var(--bleu-fonce); }

:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; border-radius: 4px; }

.lien-evitement {
  position: absolute; left: -9999px; top: 0;
  background: var(--nuit); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.lien-evitement:focus { left: 1rem; top: 1rem; color: #fff; }

.conteneur { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

.icone { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }

/* ---------- Marqueur [À COMPLÉTER] ---------- */
.a-completer {
  display: inline-block;
  background: #fff3bf;
  color: #7a4b00;
  border: 2px dashed #e0a800;
  border-radius: 6px;
  padding: .1rem .45rem;
  font-weight: 700;
  font-size: .95em;
}

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--bord);
  backdrop-filter: saturate(1.4) blur(6px);
}
.entete .conteneur {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 64px;
}
.marque {
  display: flex; align-items: center; gap: .55rem;
  font-weight: 800; font-size: 1.1rem; color: var(--nuit); text-decoration: none;
}
.marque img { width: 40px; height: auto; }
.marque span span { color: var(--bleu-texte); }
.nav-liens { display: none; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-liens a { color: var(--nuit); text-decoration: none; font-weight: 600; font-size: .98rem; }
.nav-liens a:hover { color: var(--bleu-texte); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.35rem;
  border-radius: 10px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-principal { background: var(--bleu-texte); color: #fff; }
.btn-principal:hover { background: var(--bleu-fonce); color: #fff; }
.btn-contour { background: #fff; color: var(--bleu-texte); border-color: var(--bleu-texte); }
.btn-contour:hover { background: #eef2ff; color: var(--bleu-fonce); }
.btn-clair { background: #fff; color: var(--nuit); }
.btn-clair:hover { background: #e7f8fb; color: var(--nuit); }
.btn-espace { min-height: 44px; padding: .55rem .9rem; font-size: .95rem; white-space: nowrap; }

/* ---------- Sections ---------- */
section { padding: 3.5rem 0; scroll-margin-top: 72px; }
.section-blanche { background: var(--blanc); }
.surtitre {
  display: inline-block; margin-bottom: .6rem;
  font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--bleu-texte);
}
.intro { color: var(--gris); max-width: 46rem; font-size: 1.08rem; }

/* ---------- Accroche ---------- */
.accroche { padding: 2.5rem 0 3rem; background: linear-gradient(180deg, #fff 0%, var(--fond) 100%); }
.accroche .grille { display: grid; gap: 2rem; align-items: center; }
.accroche h1 span { color: var(--bleu-texte); }
.accroche .intro { font-size: 1.15rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.actions .btn { flex: 1 1 100%; }

.demo {
  background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: 1.25rem; text-align: center;
  max-width: 340px; margin: 0 auto;
}
.demo img { display: block; width: 100%; max-width: 300px; margin: 0 auto .75rem; image-rendering: pixelated; }
.demo p { margin: 0; font-size: .95rem; color: var(--gris); }
.demo strong { color: var(--nuit); }

/* ---------- Problème ---------- */
.comparaison { display: grid; gap: 1rem; margin-top: 1.5rem; }
.carte {
  background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 1.35rem; box-shadow: var(--ombre);
}
.section-blanche .carte { background: var(--fond); box-shadow: none; }
.carte p:last-child, .carte ul:last-child { margin-bottom: 0; }
.carte-titre { display: flex; align-items: center; gap: .6rem; }
.carte-avant { border-top: 4px solid #94a3b8; }
.carte-apres { border-top: 4px solid var(--bleu); }
.carte-avant .icone { color: #64748b; }
.carte-apres .icone { color: var(--bleu-texte); }

/* ---------- Cas d'usage ---------- */
.cas { display: grid; gap: 1rem; margin-top: 1.5rem; }
.cas .carte .icone { display: block; width: 2rem; height: 2rem; color: var(--bleu-texte); margin-bottom: .5rem; }
.cas-vedette {
  background: var(--nuit) !important; color: #fff; border: none !important;
}
.cas-vedette .icone { color: var(--cyan) !important; }
.cas-vedette p { color: #cbd5e1; }
.badge {
  display: inline-block; margin-bottom: .6rem; padding: .2rem .6rem; border-radius: 999px;
  background: var(--cyan); color: var(--nuit); font-size: .8rem; font-weight: 800; align-self: flex-start;
}

/* ---------- Étapes ---------- */
.etapes { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; counter-reset: etape; }
.etapes li { position: relative; padding-left: 3.75rem; }
.etapes li::before {
  counter-increment: etape; content: counter(etape);
  position: absolute; left: 1.35rem; top: 1.35rem;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bleu-texte); color: #fff; font-weight: 800;
}
.etapes li.carte { padding-left: 4.5rem; }

/* ---------- Formule ---------- */
.formule { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.liste-coches { list-style: none; padding: 0; margin: 0 0 1rem; }
.liste-coches li { display: flex; gap: .6rem; padding: .35rem 0; }
.liste-coches .icone { color: var(--bleu-texte); margin-top: .2rem; }
.prix { font-size: 1.35rem; font-weight: 800; margin-bottom: .25rem; }
.mention { font-size: .92rem; color: var(--gris); }

/* ---------- Galerie des QR artistiques ---------- */
.galerie {
  list-style: none; padding: 0; margin: 1.5rem 0 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem;
}
.galerie figure {
  margin: 0; background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: .6rem .6rem .5rem; text-align: center;
}
.galerie img { display: block; width: 100%; border-radius: 8px; }
.galerie figcaption { font-weight: 700; font-size: .95rem; margin-top: .3rem; }
.points-forts { display: grid; gap: 1rem; margin-top: 1.5rem; }
.note { font-size: .9rem; color: var(--gris); margin: 1.25rem 0 0; }

/* ---------- Formules ---------- */
.formules { display: grid; gap: 1rem; margin-top: 1.5rem; }
.formule { display: flex; flex-direction: column; }
.formule h3 { font-size: 1.25rem; }
.formule .prix { font-size: 1.1rem; margin-top: auto; }
.formule-vedette { border: 2px solid var(--bleu-texte) !important; }
.section-blanche .formule-vedette { background: #fff; }
.lien-fort { font-weight: 700; margin-top: .5rem; }
.commun { margin-top: 1rem; }
.demo-simple { display: flex; align-items: center; gap: .75rem; margin: 1rem 0 0; font-size: .9rem; color: var(--gris); }
.demo-simple img { width: 96px; flex: none; image-rendering: pixelated; background: #fff; border-radius: 6px; }

/* Pour masquer un bloc sans toucher au PHP : ajouter la classe "masque" */
.masque { display: none !important; }

/* ---------- FAQ ---------- */
.faq { margin-top: 1.5rem; display: grid; gap: .75rem; max-width: 50rem; }
.faq details { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); }
.section-blanche .faq details { background: var(--fond); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1rem 3rem 1rem 1.25rem; position: relative;
  font-weight: 700; min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--bleu-texte);
}
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 1.25rem 1.1rem; color: var(--gris); }
.faq details > div p:last-child { margin: 0; }

/* ---------- Contact ---------- */
.contact { background: var(--bleu-texte); color: #fff; text-align: center; }
.contact h2 { color: #fff; }
.contact p { color: #eef2ff; max-width: 38rem; margin-left: auto; margin-right: auto; }
.contact a:not(.btn) { color: #fff; }

/* ---------- Espace client (formulaire de gestion) ---------- */
.espace-client .grille { display: grid; gap: 1.5rem; align-items: start; }
#gestion {
  background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: 1.35rem;
}
.champ { margin-bottom: 1.1rem; }
.champ label { display: flex; align-items: center; gap: .45rem; font-weight: 700; margin-bottom: .35rem; }
.champ label .icone { color: var(--bleu-texte); }
.champ input {
  width: 100%; min-height: 48px; padding: .7rem .9rem;
  font: inherit; font-size: 1rem; /* 16px : évite le zoom automatique sur iPhone */
  color: var(--nuit); background: #f8fafc;
  border: 1px solid #94a3b8; border-radius: 10px;
}
.champ input:focus { outline: none; border-color: var(--bleu-texte); background: #fff; box-shadow: 0 0 0 3px rgba(79, 110, 247, .3); }
.champ input::placeholder { color: #64748b; }
.aide { font-size: .88rem; color: var(--gris); margin: .3rem 0 0; }
.captcha { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.captcha input { width: 7.5rem; flex: none; letter-spacing: .15em; }
.captcha img { height: 48px; width: auto; border: 1px solid var(--bord); border-radius: 8px; cursor: pointer; background: #fff; }
.btn-lien {
  background: none; border: none; padding: .4rem; min-height: 44px;
  color: var(--bleu-texte); font: inherit; font-size: .92rem; font-weight: 600;
  text-decoration: underline; cursor: pointer;
}
#gestion .btn { width: 100%; margin-top: .5rem; }

/* ---------- Pied de page ---------- */
.pied { background: var(--nuit); color: #cbd5e1; padding: 2.25rem 0; font-size: .95rem; }
.pied p { margin: 0 0 .5rem; }
.pied a { color: #fff; }
.pied a:hover { color: var(--cyan); }

/* =========================================================
   Écrans plus larges
   ========================================================= */
@media (min-width: 560px) {
  .actions .btn { flex: 0 0 auto; }
  .comparaison, .cas { grid-template-columns: 1fr 1fr; }
  .cas-vedette { grid-column: 1 / -1; }
  #gestion { padding: 2rem; }
  #gestion .btn { width: auto; }
  .galerie { grid-template-columns: repeat(3, 1fr); }
  .formules { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 880px) {
  section { padding: 5rem 0; }
  .nav-liens { display: flex; }
  .accroche { padding: 4.5rem 0 5rem; }
  .accroche .grille { grid-template-columns: 1.4fr 1fr; gap: 3rem; }
  .demo { max-width: 320px; }
  .cas { grid-template-columns: repeat(3, 1fr); }
  .cas-vedette { grid-column: 1 / 2; grid-row: 1 / 3; display: flex; flex-direction: column; justify-content: center; }
  .etapes { grid-template-columns: repeat(3, 1fr); }
  .formule { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .espace-client .grille { grid-template-columns: 1fr 1.4fr; gap: 3rem; }
  .galerie { grid-template-columns: repeat(6, 1fr); }
  .points-forts { grid-template-columns: repeat(3, 1fr); }
  .formules { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
}

@media (max-width: 359px) { .marque > span { display: none; } }

/* =========================================================
   Galerie et fiches (galerie.php, fiche.php)
   ========================================================= */
.galerie-page, .fiche { padding-top: 2rem; }
.filtres {
  display: grid; gap: .75rem; margin: 1.5rem 0 1rem;
  background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1rem;
}
.filtre label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .25rem; }
.filtre select {
  width: 100%; min-height: 48px; padding: .6rem .8rem; font: inherit; font-size: 1rem;
  color: var(--nuit); background: #f8fafc; border: 1px solid #94a3b8; border-radius: 10px;
}
.filtre select:focus { outline: none; border-color: var(--bleu-texte); box-shadow: 0 0 0 3px rgba(79, 110, 247, .3); }
.filtre-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.compte { font-weight: 700; color: var(--gris); }

.grille-qr { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.carte-qr {
  display: flex; flex-direction: column; gap: .2rem; height: 100%;
  background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: .6rem .6rem .8rem; color: var(--nuit); text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.carte-qr:hover { color: var(--nuit); border-color: var(--bleu); box-shadow: var(--ombre); }
.carte-qr img { width: 100%; border-radius: 8px; margin-bottom: .3rem; }
.carte-qr-nom { font-weight: 700; line-height: 1.3; }
.carte-qr-ref { font-size: .82rem; color: var(--gris); }

.statut {
  align-self: flex-start; display: inline-block; margin-top: .25rem;
  padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
}
.statut-libre { background: #d3f9d8; color: #1b5e20; }
.statut-reserve { background: #fff3bf; color: #7a4b00; }
.statut-loue { background: #e2e8f0; color: #334155; }
.statut-a-confirmer { background: #e7f5ff; color: #1c4f8a; }

.retour { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; margin-bottom: 1rem; min-height: 44px; }
.fiche-grille { display: grid; gap: 1.5rem; align-items: start; }
.fiche-visuel { margin: 0; background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1rem; max-width: 420px; }
.fiche-visuel img { display: block; width: 100%; }
.fiche-visuel figcaption { font-size: .88rem; color: var(--gris); margin-top: .5rem; text-align: center; }
.details { margin: 1rem 0 1.5rem; }
.details dt { font-weight: 700; margin-top: .75rem; }
.details dd { margin: .15rem 0 0; color: var(--gris); }
.h-petit { font-size: 1.15rem; margin-top: 1rem; }
.h-section { font-size: 1.35rem; margin-top: 3rem; }

@media (min-width: 560px) {
  .filtres { grid-template-columns: repeat(3, 1fr); }
  .filtre-actions { grid-column: 1 / -1; }
  .grille-qr { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 880px) {
  .filtres { grid-template-columns: repeat(3, 1fr) auto; align-items: end; }
  .filtre-actions { grid-column: auto; }
  .grille-qr { grid-template-columns: repeat(4, 1fr); }
  .fiche-grille { grid-template-columns: 420px 1fr; gap: 3rem; }
}

/* Message affiché quand on arrive depuis un QR code sans destination (?l=…) */
.alerte-qr {
  background: #fff3bf; color: #5c3b00; border-left: 4px solid #e0a800;
  border-radius: 8px; padding: .8rem 1rem; margin: 0 0 1rem;
}

.disponible { padding-top: 2rem; }

/* Accueil : QR disponibles cliquables + encart « motif sur mesure » */
.galerie-lien { display: block; height: 100%; color: var(--nuit); text-decoration: none; }
.galerie-lien figure { height: 100%; transition: border-color .15s ease, box-shadow .15s ease; }
.galerie-lien:hover figure { border-color: var(--bleu); box-shadow: var(--ombre); }
.galerie figcaption span { display: block; font-size: .78rem; font-weight: 700; color: #1b5e20; }
.sur-mesure { display: flex; gap: 1rem; align-items: flex-start; margin-top: 1.5rem; border-left: 4px solid var(--bleu); }
.sur-mesure > .icone { width: 2.25rem; height: 2.25rem; color: var(--bleu-texte); margin-top: .2rem; }
.sur-mesure h3, .sur-mesure h2 { margin-top: 0; }
.sur-mesure .btn { margin-top: .25rem; }
@media (max-width: 559px) { .sur-mesure { flex-direction: column; gap: .5rem; } }

/* En-tête : bouton « Galerie » visible sur téléphone (le menu y est masqué faute de place) */
.entete-actions { display: flex; align-items: center; gap: .5rem; flex: none; }
.btn-galerie-mobile { display: inline-flex; }
.marque img { flex: none; }                    /* le logo ne se fait jamais écraser */
.nav-liens a { white-space: nowrap; }
@media (max-width: 559px) {
  .marque > span { display: none; }            /* logo seul, pour laisser la place aux deux boutons */
  .entete-actions .btn-espace { padding: .5rem .7rem; font-size: .9rem; }
}
@media (max-width: 1023px) {
  .nav-liens { display: none !important; }     /* menu complet seulement sur grand écran */
}
@media (min-width: 1024px) {
  .btn-galerie-mobile { display: none; }       /* sur grand écran, « Galerie » est dans le menu */
}
@media (max-width: 359px) {
  .entete-actions { gap: .35rem; }
  .entete-actions .btn-espace { padding: .5rem .6rem; }
  .entete-actions .icone { display: none; }    /* très petits écrans : texte seul */
}

/* Pages de texte (mentions légales) */
.mentions { padding-top: 2rem; }
.texte-long { max-width: 46rem; }
.texte-long h2 { font-size: 1.3rem; margin-top: 2rem; }
.texte-long h3 { font-size: 1.05rem; margin-top: 1.25rem; }
.texte-long ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.texte-long li { margin-bottom: .3rem; }
.texte-long code { font-size: .92em; background: #e7ecf5; padding: .05rem .3rem; border-radius: 4px; }
