/* Ville de Veynes – page « site en travaux ».
   Reprise propre de la page de Benjamin (veynes-site-en-travaux.html) : même allure, mais la feuille, le script, la
   photo, le blason et les polices sont dans des fichiers à part (aucun style ni script écrit dans la page).
   Couleurs et polices : en tête, dans :root. */

/* ------------------------------------------------------------------ Polices (licence libre SIL OFL, dans ../polices) */
@font-face {
  font-family: "DM Sans";
  src: url("../polices/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../polices/poppins-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ Couleurs et polices */
:root {
  --sapin: #164A3A;
  --prairie: #237247;
  --coquelicot: #D33A4A;
  --coquelicot-fonce: #B12535;
  --soleil: #F4B731;
  --encre: #1D2A24;
  --encre-2: #4E5B55;
  --trait: #E1E7E2;
  --sauge: #F1F6F1;
  /* teintes claires (t-) et couleurs d'écriture (c-) des pictogrammes */
  --t-soleil: #FDF0CC; --c-soleil: #8F6300;
  --t-rouge: #FCE3E5;  --c-rouge: #C42F3F;
  --t-ciel: #E0EEFB;   --c-ciel: #2268B2;
  --t-vert: #DDF0E3;   --c-vert: #237247;
  --f-titre: "Poppins", "Segoe UI", system-ui, sans-serif;
  --f-texte: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ------------------------------------------------------------------ Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--f-texte); font-size: 17px; line-height: 1.6; color: var(--encre); background: #fff; }
img, svg { display: block; max-width: 100%; }
a { color: var(--prairie); text-underline-offset: .2em; }
a:hover { color: var(--encre); }
:focus-visible { outline: 3px solid var(--soleil); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1200px, 100% - 2 * clamp(18px, 4vw, 48px)); margin-inline: auto; }

/* ------------------------------------------------------------------ Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border: 2px solid transparent; border-radius: 12px;
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.btn-rouge { background: var(--coquelicot); color: #fff; }
.btn-rouge:hover { background: var(--coquelicot-fonce); color: #fff; }
.btn-contour { border-color: var(--encre); color: var(--encre); }
.btn-contour:hover { background: var(--encre); color: #fff; }

/* ------------------------------------------------------------------ Bandeau photo */
.hero {
  position: relative; isolation: isolate; display: flex; flex-direction: column;
  min-height: clamp(560px, 82vh, 820px); color: #fff;
  --pb: clamp(44px, 4.5vw, 72px);   /* marge sous le titre */
  --debord: 150px;                  /* ce que la carte « Contacter la mairie » dépasse sous la photo */
}
.hero-fond { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #2B3A40; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 32%; }
.hero-voile {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 22, 28, .38) 0%, rgba(10, 22, 28, 0) 16%),
    linear-gradient(0deg, rgba(10, 22, 28, .62) 0%, rgba(10, 22, 28, .3) 30%, rgba(10, 22, 28, 0) 55%),
    linear-gradient(90deg, rgba(10, 22, 28, .32) 0%, rgba(10, 22, 28, 0) 50%);
}
.entete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; padding-block: 22px; }
.marque { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.marque img { width: 56px; height: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25)); }
.marque-nom { display: block; font-family: var(--f-titre); font-weight: 700; font-size: 28px; line-height: 1; letter-spacing: -.02em; }
.marque-lieu { display: block; margin-top: 5px; font-size: 14px; color: #E2EDE6; }
.tel-pastille {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px;
  border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; background: rgba(255, 255, 255, .14);
  color: #fff; font-weight: 700; text-decoration: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.tel-pastille:hover { background: #fff; color: var(--encre); }
.tel-pastille span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--soleil); color: var(--encre); }
.hero-corps {
  flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: clamp(32px, 6vw, 96px);
  align-items: end; padding-block: clamp(24px, 4vw, 48px) var(--pb);
}
.statut-site {
  display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 6px 16px 6px 6px;
  border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; background: rgba(255, 255, 255, .16);
  font-size: 15px; font-weight: 600;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.statut-site span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--soleil); color: var(--encre); }
h1 {
  max-width: 13ch; margin: 22px 0 0;
  font-family: var(--f-titre); font-weight: 700; font-size: clamp(44px, 6.4vw, 84px); line-height: 1; letter-spacing: -.03em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

/* ------------------------------------------------------------------ Sous la photo : le message */
.suite {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: clamp(32px, 6vw, 96px);
  padding-top: clamp(36px, 4vw, 56px); min-height: 174px;   /* la colonne de droite reste libre pour la carte */
}
.message { max-width: 640px; }
.message-accroche {
  margin: 0 0 12px; font-family: var(--f-titre); font-weight: 700; font-size: clamp(24px, 2.3vw, 31px);
  line-height: 1.2; letter-spacing: -.02em; color: var(--sapin); text-wrap: balance;
}
.message-corps { margin: 0; max-width: 36em; font-size: clamp(17px, 1.35vw, 19px); line-height: 1.6; color: var(--encre-2); text-wrap: pretty; }
.message-signature { display: flex; align-items: center; gap: 10px; margin: 18px 0 0; font-size: 16px; font-weight: 700; color: var(--encre); }
.message-signature img { width: 26px; height: auto; }

/* « Bientôt sur le nouveau site » */
.bientot { max-width: 640px; margin-top: clamp(30px, 3.4vw, 44px); padding-top: 22px; border-top: 1px solid var(--trait); }
.bientot h2 { margin: 0 0 16px; font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--encre); }
.bientot ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.bientot li { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 15.5px; line-height: 1.4; color: var(--encre); }
.bientot li span { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--soleil); color: var(--encre); }

/* ------------------------------------------------------------------ Carte « Contacter la mairie » */
.carte {
  position: relative; z-index: 2; margin-bottom: calc(-1 * (var(--pb) + var(--debord)));
  padding: clamp(24px, 3vw, 34px); border-radius: 28px; background: #fff; color: var(--encre);
  box-shadow: 0 34px 70px -34px rgba(10, 22, 28, .6), 0 2px 8px rgba(10, 22, 28, .06);
}
.carte h2 { margin: 0 0 14px; font-family: var(--f-titre); font-weight: 700; font-size: 26px; line-height: 1.1; letter-spacing: -.02em; }
/* Ouvert / fermé : posé par horaires.js (data-etat) */
.etat {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 5px 14px;
  border-radius: 999px; background: var(--sauge); font-size: 15px; font-weight: 700; color: var(--encre-2);
}
.etat::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #9AA59F; }
.etat[data-etat="ouvert"] { background: var(--t-vert); color: var(--prairie); }
.etat[data-etat="ouvert"]::before { background: #2FA35B; }
.etat[data-etat="ferme"] { background: var(--t-rouge); color: var(--c-rouge); }
.etat[data-etat="ferme"]::before { background: var(--coquelicot); }
.tel {
  display: block; margin: 0 0 6px; font-family: var(--f-titre); font-weight: 700; font-size: clamp(30px, 3vw, 36px);
  line-height: 1.1; letter-spacing: -.01em; color: var(--sapin); text-decoration: none;
}
.tel:hover { color: var(--prairie); text-decoration: underline; }
.carte address { margin: 0 0 20px; font-style: normal; color: var(--encre-2); }
.carte h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.horaires {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; margin: 0; padding: 12px 14px;
  border-radius: 16px; background: var(--sauge); font-size: 15.5px;
}
.horaires dt { font-weight: 700; }
.horaires dd { margin: 0; color: var(--encre-2); }
.note { margin: 8px 0 22px; font-size: 14px; color: var(--encre-2); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------------------------ Information urgente (bloc facultatif de la page) */
.avis {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 48px; padding: 16px 20px;
  border-radius: 18px; background: var(--t-rouge);
}
.avis strong { color: var(--c-rouge); }

/* ------------------------------------------------------------------ Démarches en ligne */
.demarches { padding-block: clamp(56px, 7vw, 96px); }
.demarches h2 { margin: 0 0 10px; font-family: var(--f-titre); font-weight: 700; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -.025em; }
.demarches-intro { max-width: 40em; margin: 0 0 32px; font-size: 18px; color: var(--encre-2); }
.tuiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.tuile {
  display: flex; flex-direction: column; gap: 14px; height: 100%; padding: 26px;
  border: 1px solid var(--trait); border-radius: 22px; color: inherit; text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.tuile:hover { border-color: var(--prairie); background: var(--sauge); color: inherit; }
.tuile:hover strong { text-decoration: underline; }
.tuile-icone { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; }
.tuile-icone--rouge { background: var(--t-rouge); color: var(--c-rouge); }
.tuile-icone--ciel { background: var(--t-ciel); color: var(--c-ciel); }
.tuile-icone--vert { background: var(--t-vert); color: var(--c-vert); }
.tuile strong { display: block; font-family: var(--f-titre); font-weight: 700; font-size: 22px; line-height: 1.15; letter-spacing: -.01em; }
.tuile p { flex: 1; margin: 0; color: var(--encre-2); }
.tuile-site { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--prairie); }

/* ------------------------------------------------------------------ Pied de page */
.pied { position: relative; margin-top: 70px; padding-block: 44px 32px; background: var(--sapin); color: #D3E5DA; font-size: 15px; }
.pied-crete { position: absolute; left: 0; bottom: 100%; width: 100%; max-width: none; height: 70px; color: var(--sapin); }
.pied-haut {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
  padding-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, .16);
}
.pied-marque { display: flex; align-items: center; gap: 14px; }
.pied-marque img { width: 56px; height: auto; }
.pied-marque span { font-family: var(--f-titre); font-weight: 700; font-size: 26px; line-height: 1; letter-spacing: -.02em; color: #fff; }
.merci { margin: 0; font-family: var(--f-titre); font-weight: 700; font-size: clamp(20px, 2vw, 24px); line-height: 1.25; color: #fff; }
/* « Mentions légales » et « Réalisation » sur la même ligne, chacun avec une zone de clic de 44 px de haut */
.pied-bas { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0 32px; padding-top: 9px; font-size: 14px; }
.pied a { color: #fff; }
.mentions { max-width: 46em; }
.mentions summary { padding-block: 11px; cursor: pointer; font-weight: 700; color: #fff; }
.mentions p { margin: 8px 0 0; line-height: 1.5; }
.mentions[open] summary { margin-bottom: 0; }
.pied-droite { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.droits { margin: 0; }
/* « Réalisation » + logo Algoralp (blanc), lien vers https://algoralp.fr/ dans un nouvel onglet */
.pied-realisation { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; opacity: .85; transition: opacity .2s; }
.pied-realisation:hover { opacity: 1; color: #fff; }
.pied-realisation img { width: auto; height: 22px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ------------------------------------------------------------------ Page « introuvable » (404.html) */
.erreur-bandeau { background: var(--sapin); }
.erreur { padding-block: clamp(48px, 8vw, 110px) clamp(16px, 3vw, 40px); }
.erreur .statut-site { border-color: var(--trait); background: var(--sauge); color: var(--encre); }
.erreur h1 { max-width: 18ch; margin: 18px 0 14px; color: var(--sapin); text-shadow: none; font-size: clamp(36px, 5vw, 60px); }
.erreur p.erreur-texte { max-width: 36em; margin: 0 0 26px; font-size: clamp(17px, 1.35vw, 19px); color: var(--encre-2); }

/* ------------------------------------------------------------------ Tablette et téléphone */
@media (max-width: 960px) {
  .hero { min-height: 0; }
  .hero-fond { bottom: 480px; }   /* la photo s'arrête au-dessus de la carte, posée dessous */
  .hero-corps { grid-template-columns: minmax(0, 1fr); padding-top: clamp(120px, 30vh, 260px); padding-bottom: 48px; }
  .carte { margin-bottom: 0; }
  .suite { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .bientot ul { grid-template-columns: minmax(0, 1fr); }
  .bientot li { flex-direction: row; align-items: center; }
  .hero-voile {
    background:
      linear-gradient(180deg, rgba(10, 22, 28, .4) 0%, rgba(10, 22, 28, 0) 18%),
      linear-gradient(0deg, rgba(10, 22, 28, .7) 0%, rgba(10, 22, 28, .35) 45%, rgba(10, 22, 28, 0) 70%);
  }
  .tuiles { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .tel-pastille { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tuile, .pied-realisation { transition: none; }
}
