/* ==========================================================================
   Aldo Peinture Sàrl — feuille de style unique
   Palette échantillonnée DANS le logo d'Aldo (script bleu marine + 4 encres CMJN).
   Typographie : Archivo variable, une seule famille, trois chasses
   (118 % titrage · 100 % texte · 68 % étiquettes de chantier).
   ========================================================================== */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('assets/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('assets/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- jetons ------------------------------------------------------------- */
:root {
  /* les quatre encres, prélevées au pixel dans le logo */
  --cyan: #1999d6;
  --magenta: #e2137f;
  --jaune: #faea1b;
  --noir: #1e1e1c;
  /* l'encre du lettrage */
  --encre: #192645;

  /* clair : mur de plâtre frais, neutre tiré vers le bleu de l'encre */
  --fond: #f3f3f0;
  --fond-2: #e8e8e3;
  --fond-3: #dcdcd5;
  --texte: #192645;
  --texte-doux: #5b6478;
  --trait: #cfcfc7;
  --carte: #ffffff;
  --ombre: 0 1px 2px rgba(25, 38, 69, .05), 0 12px 32px -12px rgba(25, 38, 69, .16);

  --max: 1180px;
  --gouttiere: clamp(1.25rem, 5vw, 3.5rem);

  --pas-2: 1rem;
  --pas-3: 1.75rem;
  --pas-4: 3rem;
  --pas-5: 5rem;
  --pas-6: clamp(4.5rem, 11vw, 8.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0e1730;
    --fond-2: #141f3d;
    --fond-3: #1c294b;
    --texte: #e9ecf4;
    --texte-doux: #9aa5be;
    --trait: #2a3757;
    --carte: #16213f;
    --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
  }
}
:root[data-theme='dark'] {
  --fond: #0e1730;
  --fond-2: #141f3d;
  --fond-3: #1c294b;
  --texte: #e9ecf4;
  --texte-doux: #9aa5be;
  --trait: #2a3757;
  --carte: #16213f;
  --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
}
:root[data-theme='light'] {
  --fond: #f3f3f0;
  --fond-2: #e8e8e3;
  --fond-3: #dcdcd5;
  --texte: #192645;
  --texte-doux: #5b6478;
  --trait: #cfcfc7;
  --carte: #ffffff;
  --ombre: 0 1px 2px rgba(25, 38, 69, .05), 0 12px 32px -12px rgba(25, 38, 69, .16);
}

/* --- socle -------------------------------------------------------------- */
*, *::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;
  background: var(--fond);
  color: var(--texte);
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-stretch: 100%;
  font-size: clamp(1rem, .96rem + .2vw, 1.1rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }

a { color: inherit; }

:where(a, button, input, summary):focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

.enveloppe { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gouttiere); }

.saut { position: absolute; left: -9999px; top: 0; background: var(--encre); color: #fff; padding: .75rem 1.25rem; z-index: 100; }
.saut:focus { left: .5rem; top: .5rem; }

/* --- voix typographiques ------------------------------------------------ */
.titrage {
  font-stretch: 118%;
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.022em;
  text-wrap: balance;
  margin: 0;
}
.etiquette {
  font-stretch: 68%;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--texte-doux);
  margin: 0;
}

h1.titrage { font-size: clamp(2.6rem, 7.4vw, 5.5rem); }
h2.titrage { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h3.titrage { font-size: clamp(1.25rem, 1.9vw, 1.55rem); letter-spacing: -.01em; line-height: 1.12; }

.mesure { max-width: 62ch; }

/* --- le filet CMJN : le dispositif structurant de tout le site ----------- */
.filet {
  display: flex;
  height: 6px;
  width: 100%;
  border: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.filet span { flex: 1; }
.filet span:nth-child(1) { background: var(--cyan); }
.filet span:nth-child(2) { background: var(--magenta); }
.filet span:nth-child(3) { background: var(--jaune); }
.filet span:nth-child(4) { background: var(--noir); }


/* --- en-tête ------------------------------------------------------------ */
.entete {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--fond) 93%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--trait);
}
.entete__barre {
  display: flex;
  align-items: center;
  gap: var(--pas-3);
  min-height: 92px;
}
.entete__logo { margin-right: auto; display: block; }
.entete__logo img { width: clamp(158px, 22vw, 214px); max-height: 72px; object-fit: contain; object-position: left center; }
:root[data-theme='dark'] .entete__logo img,
.entete__logo img { transition: opacity .2s; }
@media (prefers-color-scheme: dark) {
  .entete__logo img { filter: invert(1) hue-rotate(180deg) saturate(1.25) brightness(1.08); }
}
:root[data-theme='dark'] .entete__logo img { filter: invert(1) hue-rotate(180deg) saturate(1.25) brightness(1.08); }
:root[data-theme='light'] .entete__logo img { filter: none; }

.nav { display: flex; gap: clamp(1rem, 2vw, 2rem); align-items: center; }
.nav a {
  text-decoration: none;
  white-space: nowrap;
  font-stretch: 68%;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--texte-doux);
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
  transition: color .18s, border-color .18s;
}
.nav a:hover { color: var(--texte); border-bottom-color: var(--magenta); }
@media (max-width: 860px) { .nav { display: none; } }

/* menu compact : un <details>, donc accessible au clavier sans script */
.menu { display: none; position: relative; }
@media (max-width: 860px) { .menu { display: block; } }
.menu > summary {
  list-style: none;
  cursor: pointer;
  width: 46px; height: 46px;
  display: grid;
  align-content: center;
  justify-items: stretch;
  gap: 6px;
  padding: 0 9px;
  border: 1.5px solid var(--trait);
}
.menu > summary::-webkit-details-marker { display: none; }
.menu__trait { display: block; height: 2px; background: var(--texte); }
.menu[open] > summary { border-color: var(--texte); }
.menu__volet {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 232px;
  display: grid;
  background: var(--carte);
  border: 1px solid var(--trait);
  box-shadow: var(--ombre);
  z-index: 50;
}
.menu__volet a {
  text-decoration: none;
  padding: .95rem 1.25rem;
  font-stretch: 68%;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--texte-doux);
  border-bottom: 1px solid var(--trait);
}
.menu__volet a:last-child { border-bottom: 0; }
.menu__volet a:hover { color: var(--texte); background: var(--fond-2); }

.tel-entete {
  display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none;
  font-stretch: 100%;
  font-weight: 600;
  font-size: .95rem;
  padding: .6rem 1.1rem;
  border: 1.5px solid var(--texte);
  color: var(--texte);
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.tel-entete:hover { background: var(--texte); color: var(--fond); }
@media (max-width: 560px) { .tel-entete span { display: none; } }

/* --- héros -------------------------------------------------------------- */
.heros { position: relative; background: var(--encre); color: #f3f3f0; overflow: hidden; }
.heros__image {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .52;
}
.heros__voile {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(25,38,69,.80) 0%, rgba(25,38,69,.34) 46%, rgba(25,38,69,.92) 100%);
}
.heros__contenu {
  position: relative;
  padding-block: clamp(5rem, 15vh, 9rem) clamp(3.5rem, 9vh, 6rem);
  display: grid;
  gap: var(--pas-3);
}
.heros .etiquette { color: rgba(243,243,240,.72); }
.heros h1 { color: #fff; max-width: 15ch; }

/* le coup de rouleau : le titre est découvert comme un mur qu'on peint */
.rouleau > span {
  display: block;
  clip-path: inset(0 100% 0 0);
  animation: passe-rouleau .9s cubic-bezier(.22,.61,.36,1) forwards;
}
.rouleau > span:nth-child(2) { animation-delay: .16s; }
.rouleau > span:nth-child(3) { animation-delay: .32s; }
@keyframes passe-rouleau { to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) {
  .rouleau > span { animation: none; clip-path: none; }
}

.heros__accroche { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: rgba(243,243,240,.86); max-width: 46ch; margin: 0; }

.boutons { display: flex; flex-wrap: wrap; gap: var(--pas-2); margin-top: var(--pas-2); }
.bouton {
  display: inline-flex; align-items: center; gap: .6rem;
  text-decoration: none;
  font-stretch: 100%; font-weight: 600;
  padding: .95rem 1.7rem;
  transition: transform .16s, background .18s, color .18s;
}
.bouton:hover { transform: translateY(-2px); }
.bouton--plein { background: var(--magenta); color: #fff; }
.bouton--plein:hover { background: #c2106c; }
.bouton--creux { border: 1.5px solid rgba(243,243,240,.5); color: #f3f3f0; }
.bouton--creux:hover { background: rgba(243,243,240,.12); }

/* --- bande de faits ----------------------------------------------------- */
.faits { background: var(--fond-2); border-bottom: 1px solid var(--trait); }
.faits__liste {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--pas-3);
  padding-block: var(--pas-3);
  margin: 0;
}
.faits__liste > div { display: grid; gap: .3rem; }
.faits dt { font-stretch: 68%; font-weight: 600; font-size: .74rem; letter-spacing: .15em; text-transform: uppercase; color: var(--texte-doux); }
@media (min-width: 900px) { .faits__liste { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.faits dd { margin: 0; font-stretch: 112%; font-weight: 700; font-size: 1.35rem; line-height: 1.15; letter-spacing: -.01em; }

/* --- sections ----------------------------------------------------------- */
.section { padding-block: var(--pas-6); }
[id] { scroll-margin-top: 108px; }
.section--creux { background: var(--fond-2); }

.section__tete { display: grid; gap: var(--pas-2); margin-bottom: var(--pas-4); }
.section__tete .etiquette { display: flex; align-items: center; gap: .8rem; }
.section__tete .etiquette::after { content: ''; flex: 1; height: 1px; background: var(--trait); max-width: 220px; }
.section__intro { color: var(--texte-doux); font-size: 1.08rem; margin: 0; }

/* --- métiers ------------------------------------------------------------ */
.metiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 1px; background: var(--trait); border: 1px solid var(--trait); }
.metier {
  position: relative;
  background: var(--carte);
  padding: var(--pas-3) var(--pas-3) calc(var(--pas-3) + 6px);
  display: grid;
  gap: .7rem;
  align-content: start;
  overflow: hidden;
  transition: background .2s;
}
.metier::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 6px;
  background: var(--ton, var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .38s cubic-bezier(.22,.61,.36,1);
}
.metier:hover::after, .metier:focus-within::after { transform: scaleX(1); }
.metier__num { font-stretch: 68%; font-weight: 600; font-size: .72rem; letter-spacing: .16em; color: var(--ton); }
.metier p { margin: 0; color: var(--texte-doux); font-size: .97rem; }

/* --- avant / après ------------------------------------------------------ */
.chantiers { display: grid; gap: var(--pas-4); }
.chantier { display: grid; gap: var(--pas-2); }
.chantier__legende { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; }
.chantier__legende h3 { margin: 0; }
.chantier__legende p { margin: 0; color: var(--texte-doux); font-size: .95rem; }

.comparateur {
  position: relative;
  overflow: hidden;
  background: var(--fond-3);
  box-shadow: var(--ombre);
  touch-action: pan-y;
  user-select: none;
  isolation: isolate;
}
.comparateur img { width: 100%; display: block; }
.comparateur__apres { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--curseur, 50%)); }
.comparateur__apres img { height: 100%; object-fit: cover; }

.comparateur__poignee {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--curseur, 50%);
  width: 3px;
  background: #f3f3f0;
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(25,38,69,.25);
}
.comparateur__prise {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #f3f3f0;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 18px rgba(25,38,69,.35);
  color: var(--encre);
}
.comparateur__prise svg { width: 26px; height: 26px; }

.comparateur input[type='range'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.comparateur input[type='range']:focus-visible { opacity: 1; outline: 3px solid var(--cyan); outline-offset: -3px; }

.comparateur__etiq {
  position: absolute;
  top: var(--pas-2);
  font-stretch: 68%;
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: .35rem .7rem;
  background: rgba(25,38,69,.82);
  color: #f3f3f0;
  pointer-events: none;
}
.comparateur__etiq--avant { left: var(--pas-2); }
.comparateur__etiq--apres { right: var(--pas-2); background: var(--magenta); }

/* --- galerie ------------------------------------------------------------ */
.galerie {
  columns: 3 260px;
  column-gap: var(--pas-2);
}
.galerie figure {
  margin: 0 0 var(--pas-2);
  break-inside: avoid;
  position: relative;
  overflow: hidden;
  background: var(--fond-3);
}
.galerie img { width: 100%; transition: transform .55s cubic-bezier(.22,.61,.36,1); }
.galerie figure:hover img { transform: scale(1.035); }
.galerie figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.4rem .9rem .8rem;
  background: linear-gradient(180deg, transparent, rgba(25,38,69,.86));
  color: #f3f3f0;
  font-stretch: 68%;
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s, transform .3s;
}
.galerie figure:hover figcaption, .galerie figure:focus-within figcaption { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .galerie img, .galerie figcaption { transition: none; }
  .galerie figcaption { opacity: 1; transform: none; }
}

/* --- l'artisan ---------------------------------------------------------- */
.artisan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 900px) { .artisan { grid-template-columns: 1fr; } }
.artisan__image { position: relative; }
.artisan__image img { width: 100%; box-shadow: var(--ombre); }
.artisan__macaron {
  position: absolute;
  right: -14px; bottom: -22px;
  width: clamp(110px, 16vw, 168px);
  box-shadow: none;
}
.artisan__texte { display: grid; gap: var(--pas-2); }
.artisan__texte p { margin: 0; }

.titres { list-style: none; margin: var(--pas-2) 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--trait); }
.titres li { display: grid; gap: .15rem; padding: .9rem 0; border-bottom: 1px solid var(--trait); }
.titres strong { font-stretch: 100%; font-weight: 600; }
.titres span { font-stretch: 68%; font-weight: 600; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-doux); }

/* --- contact ------------------------------------------------------------ */
.contact { background: var(--encre); color: #f3f3f0; }
.contact .etiquette { color: rgba(243,243,240,.66); }
.contact .section__tete .etiquette::after { background: rgba(243,243,240,.24); }
.contact h2 { color: #fff; }
.contact__grille { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 4.5rem); }
@media (max-width: 860px) { .contact__grille { grid-template-columns: 1fr; } }

.coordonnees { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--pas-2); }
.coordonnees li { display: grid; gap: .2rem; padding-bottom: var(--pas-2); border-bottom: 1px solid rgba(243,243,240,.16); }
.coordonnees dt, .coordonnees .cle { font-stretch: 68%; font-weight: 600; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(243,243,240,.6); }
.coordonnees a, .coordonnees .val { font-stretch: 112%; font-weight: 700; font-size: clamp(1.2rem, 2.4vw, 1.7rem); letter-spacing: -.01em; text-decoration: none; color: #fff; line-height: 1.2; }
.coordonnees a:hover { color: var(--jaune); }
.coordonnees .val { font-weight: 500; font-stretch: 100%; font-size: 1.05rem; letter-spacing: 0; }

/* --- pied --------------------------------------------------------------- */
.pied { background: var(--fond-2); padding-block: var(--pas-4); font-size: .9rem; color: var(--texte-doux); }
.pied__grille { display: flex; flex-wrap: wrap; gap: var(--pas-2) var(--pas-4); align-items: center; justify-content: space-between; }
.pied a { color: var(--texte-doux); }
.pied nav { display: flex; flex-wrap: wrap; gap: var(--pas-2) var(--pas-3); }

/* --- pages légales ------------------------------------------------------ */
.legal { padding-block: var(--pas-5); }
.legal h1 { margin-bottom: var(--pas-3); }
.legal h2 { font-stretch: 112%; font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; margin: var(--pas-3) 0 .5rem; }
.legal p, .legal li { max-width: 68ch; }
.legal .retour { display: inline-block; margin-bottom: var(--pas-3); text-decoration: none; font-stretch: 68%; font-weight: 600; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-doux); }
.legal .retour:hover { color: var(--magenta); }

/* --- apparitions au défilement ------------------------------------------ */
.apparait { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,.61,.36,1); }
.apparait.vu { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .apparait { opacity: 1; transform: none; transition: none; }
}
