/* Informatique Grasse — feuille de style
   Palette : eau du Loup, pierre des villages, jaune de signalisation. */
:root {
  --fond: #F2F4F1;
  --blanc: #FFFFFF;
  --encre: #1C2B30;
  --encre-douce: #4A5A5F;
  --loup: #0E5A55;
  --loup-fonce: #0A4440;
  --pierre: #E3E7E1;
  --trait: #C5CEC9;
  --signal: #F5C518;
  --signal-fonce: #D9AC00;
  --erreur: #A3261B;

  --titre: "Archivo", "Arial Narrow", Arial, sans-serif;
  --texte: "Atkinson Hyperlegible", Verdana, Arial, sans-serif;
  --largeur: 74rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 400 1.125rem/1.6 var(--texte);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--loup); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--loup-fonce); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--loup); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--titre);
  font-stretch: 112%;
  line-height: 1.08;
  margin: 0 0 .6em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); font-weight: 800; max-width: 16ch; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); font-weight: 750; max-width: 24ch; }
h3 { font-size: 1.15rem; font-weight: 700; font-stretch: 105%; letter-spacing: 0; }
p { margin: 0 0 1em; }

.contenu { max-width: var(--largeur); margin: 0 auto; padding: 0 1.25rem; }
.evitement { position: absolute; left: -999px; top: 0; background: var(--signal); color: var(--encre); padding: .6rem 1rem; z-index: 100; }
.evitement:focus { left: 1rem; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 1rem/1.2 var(--texte);
  padding: .7rem 1.1rem;
  border-radius: 4px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
}
.btn-grand { font-size: 1.1rem; padding: .95rem 1.4rem; }
.btn-signal { background: var(--signal); color: var(--encre); border-color: var(--signal); }
.btn-signal:hover { background: var(--signal-fonce); border-color: var(--signal-fonce); color: var(--encre); }
.btn-contour { border-color: var(--encre); color: var(--encre); background: transparent; }
.btn-contour:hover { background: var(--encre); color: var(--blanc); }

/* ---------- En-tête ---------- */
.entete { background: var(--blanc); border-bottom: 1px solid var(--trait); position: sticky; top: 0; z-index: 10; }
.entete-ligne { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.marque { display: flex; flex-direction: column; text-decoration: none; color: var(--encre); margin-right: auto; }
.marque-nom { font: 800 1.3rem/1.1 var(--titre); font-stretch: 118%; }
.marque-sous { font-size: .85rem; color: var(--encre-douce); }
.nav { display: flex; gap: 1.5rem; }
.nav a { color: var(--encre); text-decoration: none; font-weight: 700; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--loup); }
.nav-bouton { display: none; }

/* ---------- Ouverture ---------- */
.ouverture { padding: clamp(2.5rem, 6vw, 5rem) 0; border-bottom: 1px solid var(--trait); }
.ouverture-grille { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.chapeau { font-size: 1.25rem; max-width: 38em; color: var(--encre); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 1rem; }
.note { font-size: .95rem; color: var(--encre-douce); max-width: 40em; }
.fil { font-size: .95rem; margin-bottom: 1.25rem; color: var(--encre-douce); }

/* ---------- La route (élément signature) ---------- */
.route-bloc { background: var(--blanc); border: 1px solid var(--trait); border-radius: 6px; padding: 1.5rem 1.5rem 1.1rem; }
.route { list-style: none; margin: 0; padding: 0 0 0 3.25rem; position: relative; }
.route::before {               /* la chaussée */
  content: ""; position: absolute; left: .75rem; top: .4rem; bottom: .4rem;
  width: 1.4rem; background: var(--encre); border-radius: 3px; z-index: 0;
}
.route::after {                /* la ligne médiane */
  content: ""; position: absolute; left: calc(.75rem + .7rem - 1.5px); top: 1rem; bottom: 1rem; width: 3px;
  background: repeating-linear-gradient(to bottom, var(--signal) 0 .7rem, transparent .7rem 1.3rem); z-index: 0;
}
.etape {
  position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .8rem 0; border-bottom: 1px solid var(--pierre);
}
.etape:last-child { border-bottom: 0; }
.etape::before {               /* le repère sur la route */
  content: ""; position: absolute; z-index: 2;
  left: calc(-3.25rem + .75rem + .7rem - .6rem); top: 50%; transform: translateY(-50%);
  width: 1.2rem; height: 1.2rem; border-radius: 50%;
  background: var(--blanc); border: 3px solid var(--encre);
}
.etape-atelier::before { background: var(--signal); }
.etape.actif::before { background: var(--loup); border-color: var(--blanc); box-shadow: 0 0 0 2px var(--loup); }
.etape-nom { font: 700 1.2rem/1.2 var(--titre); font-stretch: 110%; color: var(--encre); text-decoration: none; }
a.etape-nom:hover { color: var(--loup); text-decoration: underline; }
.etape.actif .etape-nom { color: var(--loup); }
.etape-info { font-size: .95rem; color: var(--encre-douce); font-variant-numeric: tabular-nums; white-space: nowrap; }
.route-legende { font-size: .85rem; color: var(--encre-douce); margin: .9rem 0 0; }
.distance { text-align: left; }
.distance-temps { font: 800 clamp(2.5rem, 6vw, 4rem)/1 var(--titre); font-stretch: 115%; margin-bottom: .3rem; }

@media (prefers-reduced-motion: no-preference) {
  .etape { animation: arrivee .5s ease-out both; }
  .etape:nth-child(2) { animation-delay: .08s; } .etape:nth-child(3) { animation-delay: .16s; }
  .etape:nth-child(4) { animation-delay: .24s; } .etape:nth-child(5) { animation-delay: .32s; }
  .etape:nth-child(6) { animation-delay: .40s; } .etape:nth-child(7) { animation-delay: .48s; }
  @keyframes arrivee { from { opacity: 0; transform: translateY(-.4rem); } }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-pierre { background: var(--pierre); }
.section-loup { background: var(--loup); color: var(--blanc); }
.section-loup a { color: var(--blanc); }
.intro { max-width: 40em; color: var(--encre-douce); margin-bottom: 2rem; }

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); column-gap: 2.5rem; }
.service { border-top: 2px solid var(--encre); padding: 1rem 0 1.5rem; }
.service p { margin: 0; color: var(--encre-douce); }

.deroulement { list-style: none; counter-reset: etape; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.deroulement li { counter-increment: etape; }
.deroulement li::before {
  content: counter(etape);
  display: block; font: 800 3rem/1 var(--titre); font-stretch: 115%; color: var(--loup); margin-bottom: .6rem;
}
.deroulement p { color: var(--encre-douce); margin: 0; }

.pros-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.pros-grille p { max-width: 30em; font-size: 1.15rem; }
.liste-pros { list-style: none; margin: 0; padding: 0; }
.liste-pros li { padding: .75rem 0; border-top: 1px solid rgba(255,255,255,.3); font-weight: 700; }
.liste-pros li:last-child { border-bottom: 1px solid rgba(255,255,255,.3); }

.communes { list-style: none; margin: 1.5rem 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .75rem; }
.communes a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  background: var(--blanc); border: 2px solid var(--encre); border-radius: 4px;
  padding: .8rem 1rem; color: var(--encre); text-decoration: none;
  font: 700 1.1rem/1.2 var(--titre); font-stretch: 108%;
}
.communes a:hover { background: var(--encre); color: var(--blanc); }
.communes a:hover .communes-temps { color: var(--signal); }
.communes-temps { font: 400 .95rem/1 var(--texte); color: var(--encre-douce); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Page commune ---------- */
.local-grille { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.texte-long { max-width: 40em; }
.situations { background: var(--blanc); border-left: 6px solid var(--signal); padding: 1.4rem 1.5rem; }
.situations ul { margin: 0; padding-left: 1.1rem; }
.situations li { margin-bottom: .55rem; }

/* ---------- Bandeau d'appel ---------- */
.appel { background: var(--signal); padding: clamp(3rem, 6vw, 4.5rem) 0; }
.appel a { color: var(--encre); }
.appel-grille { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.appel-numero { font: 800 clamp(2.2rem, 6vw, 3.6rem)/1 var(--titre); font-stretch: 115%; margin: .2rem 0 1rem; }
.appel-numero a { text-decoration: none; color: inherit; }
.appel-numero a:hover { text-decoration: underline; }
.appel-atelier { font-size: 1rem; margin-top: 1rem; }
.horaires { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.5rem; margin: 0; }
.horaires dt { font-weight: 700; }
.horaires dd { margin: 0; font-variant-numeric: tabular-nums; }

/* ---------- Formulaire ---------- */
.contact-grille { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-cote { background: var(--blanc); border: 1px solid var(--trait); border-radius: 6px; padding: 1.5rem; }
.contact-cote .appel-numero { font-size: 2rem; }
.formulaire { margin-top: 1.5rem; }
.champ { margin: 0 0 1.25rem; border: 0; padding: 0; min-width: 0; }
.champ-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
.champ label, .champ legend { display: block; font-weight: 700; margin-bottom: .35rem; padding: 0; }
.champ .choix { font-weight: 400; display: flex; align-items: center; gap: .5rem; margin: .35rem 0; }
.facultatif { font-weight: 400; color: var(--encre-douce); }
input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%; font: inherit; color: var(--encre);
  background: var(--blanc); border: 2px solid var(--trait); border-radius: 4px; padding: .65rem .8rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--loup); outline: none; box-shadow: 0 0 0 3px rgba(14,90,85,.25); }
input[type="radio"] { width: 1.2rem; height: 1.2rem; accent-color: var(--loup); }
[aria-invalid="true"] { border-color: var(--erreur) !important; }
.champ-erreur { color: var(--erreur); font-size: .95rem; margin: .35rem 0 0; }
.message-erreur { background: #FBEAE8; border-left: 5px solid var(--erreur); padding: .9rem 1rem; }
.message-ok { background: var(--blanc); border-left: 6px solid var(--loup); padding: 1.25rem 1.5rem; margin-top: 1.5rem; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Pied de page ---------- */
.pied { background: var(--encre); color: #D5DDDA; padding: 3rem 0 1.5rem; font-size: 1rem; }
.pied a { color: var(--blanc); }
.pied-grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.pied-titre { font: 700 1.05rem/1.3 var(--titre); color: var(--blanc); margin-bottom: .7rem; }
.pied-liste { list-style: none; margin: 0; padding: 0; }
.pied-liste li { margin-bottom: .35rem; }
.pied-bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem; padding-top: 1.25rem; font-size: .9rem; }
.pied-bas p { margin: 0; }

/* ---------- Écrans moyens et petits ---------- */
@media (max-width: 960px) {
  .ouverture-grille, .local-grille, .pros-grille, .appel-grille, .contact-grille { grid-template-columns: 1fr; }
  .deroulement { grid-template-columns: 1fr 1fr; }
  .pied-grille { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 1.0625rem; }
  .entete-ligne { flex-wrap: wrap; gap: .75rem; padding-top: .6rem; padding-bottom: .6rem; }
  .marque-nom { font-size: 1.15rem; }
  .nav-bouton {
    display: inline-block; font: 700 1rem var(--texte); background: none; color: var(--encre);
    border: 2px solid var(--encre); border-radius: 4px; padding: .45rem .8rem; cursor: pointer;
  }
  .entete-tel { order: 3; width: 100%; }
  .nav { display: none; order: 4; width: 100%; flex-direction: column; gap: 0; padding-bottom: .5rem; }
  .nav.ouvert { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid var(--pierre); }
  .deroulement, .champ-duo, .pied-grille { grid-template-columns: 1fr; }
  .actions .btn { width: 100%; }
  .route-bloc { padding: 1.1rem 1rem .9rem; }
}
