/* Atelier 28 — feuille de style unique.
   Les couleurs sont declarees une fois ici : changer la palette du site revient
   a changer ces quelques lignes. */

:root {
  --fond: #f6f7f8;
  --fond-carte: #ffffff;
  --fond-appui: #eef1f4;
  --texte: #1c2733;
  --texte-doux: #5c6b7a;
  --accent: #b4541c;          /* cuivre : l'electronique et l'etabli */
  --accent-fonce: #8d4015;
  --accent-clair: #fbeee6;
  --encre: #17212c;           /* banniere et pied */
  --bord: #dde3e9;
  --rayon: 10px;
  --largeur: 62rem;
  --police: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #13181d;
    --fond-carte: #1b2128;
    --fond-appui: #1f262e;
    --texte: #e7ebee;
    --texte-doux: #a0adba;
    --accent: #e08a52;
    --accent-fonce: #c9723c;
    --accent-clair: #2a2019;
    --encre: #0e1318;
    --bord: #2b333c;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--police);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--texte);
  background: var(--fond);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

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

a { color: var(--accent); }
a:hover { text-decoration: none; }

h1, h2, h3 { line-height: 1.2; font-weight: 650; }
h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); margin: 0 0 .6rem; }
h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); margin: 3rem 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 .4rem; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  background: var(--accent-clair);
  padding: .1em .35em;
  border-radius: 4px;
}

.evitement {
  position: absolute;
  left: -9999px;
  background: var(--accent);
  color: #fff;
  padding: .6rem 1rem;
}
.evitement:focus { left: .5rem; top: .5rem; z-index: 10; }

/* En-tete ------------------------------------------------------------- */
.entete { background: var(--fond-carte); border-bottom: 1px solid var(--bord); }

.entete__barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  padding-top: .9rem;
  padding-bottom: .9rem;
}

.marque {
  font-weight: 750;
  font-size: 1.25rem;
  letter-spacing: -.01em;
  color: var(--texte);
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.marque__sous {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--texte-doux);
}

.menu__liste { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.menu__liste a { text-decoration: none; color: var(--texte-doux); padding: .2rem 0; }
.menu__liste a:hover,
.menu__liste a[aria-current="page"] {
  color: var(--texte);
  border-bottom: 2px solid var(--accent);
}

.menu__bouton { display: none; }

@media (max-width: 40rem) {
  .menu__bouton[hidden] { display: none; }
  .menu__bouton {
    display: block;
    font: inherit;
    color: var(--texte);
    background: var(--fond-appui);
    border: 1px solid var(--bord);
    border-radius: var(--rayon);
    padding: .35rem .9rem;
    cursor: pointer;
  }
  .menu[hidden] { display: none; }
  .menu { width: 100%; }
  .menu__liste { flex-direction: column; gap: .5rem; }
}

/* Banniere ------------------------------------------------------------ */
.banniere {
  background: var(--encre);
  color: #f1f4f7;
  padding: clamp(2.5rem, 8vw, 5rem) 0;
}

.banniere__texte { max-width: 42rem; }
.banniere h1 { color: #fff; }

.surtitre {
  margin: 0 0 .5rem;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 650;
}

.banniere .accroche { color: #c3ccd5; font-size: 1.15rem; }
.banniere__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* Bande de chiffres --------------------------------------------------- */
.bande {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: center;
  padding-top: 2.5rem;
  padding-bottom: 1rem;
}

.bande__chiffre { flex: 0 0 auto; }
.bande__chiffre p { margin: 0; color: var(--texte-doux); max-width: 14rem; }
.chiffre { font-size: 2.4rem; font-weight: 750; color: var(--accent); line-height: 1; }
.bande__texte { flex: 1 1 22rem; margin: 0; font-size: 1.1rem; }

/* Cartes -------------------------------------------------------------- */
.cartes {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.carte {
  background: var(--fond-carte);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 1.4rem;
}

.carte p { margin: 0; color: var(--texte-doux); }
.carte--accent { border-color: var(--accent); background: var(--accent-clair); }
.carte--accent p { color: var(--texte); }
.lien-fort { font-weight: 650; }

/* Interventions ------------------------------------------------------- */
.titre-page { padding-top: 2.5rem; }
.accroche { font-size: 1.15rem; color: var(--texte-doux); max-width: 40rem; }

.publics {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin-top: 1.5rem;
}

.public {
  background: var(--fond-carte);
  border: 1px solid var(--bord);
  border-top: 3px solid var(--accent);
  border-radius: var(--rayon);
  padding: 1.4rem;
}

.public h2 { margin: 0 0 .6rem; font-size: 1.2rem; }
.public p { margin: 0 0 .7rem; color: var(--texte-doux); }

.avertissement {
  font-weight: 650;
  color: var(--accent-fonce) !important;
  background: var(--accent-clair);
  border-radius: 6px;
  padding: .4rem .7rem;
  display: inline-block;
}

/* Temoignages et galerie ---------------------------------------------- */
.temoignages, .galerie__grille {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.temoignage, .galerie figure {
  margin: 0;
  background: var(--fond-carte);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  overflow: hidden;
}

.temoignage img, .galerie img {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  display: block;
  background: var(--fond-appui);
}

/* Un temoignage sans photo : on remplace l'image par un filet d'accent, pour
   qu'il ait l'air voulu a cote de ceux qui en ont une. */
.temoignage--sans-photo {
  border-top: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  justify-content: center;   /* sans image, le texte se centre plutot que de
                                laisser un vide sous lui */
}

.temoignage blockquote { margin: 0; padding: 1rem 1.2rem .3rem; font-size: .98rem; }
.temoignage figcaption, .galerie figcaption {
  padding: 0 1.2rem 1.1rem;
  color: var(--texte-doux);
  font-size: .88rem;
}
.galerie figcaption { padding-top: .8rem; }

.note { color: var(--texte-doux); font-size: .92rem; }

.appel {
  background: var(--fond-appui);
  border-radius: var(--rayon);
  padding: 1.75rem;
  margin: 3rem auto;
  text-align: center;
}
.appel h2 { margin-top: 0; }

/* Contact ------------------------------------------------------------- */
.contact {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
  padding-bottom: 3rem;
}

@media (max-width: 46rem) {
  .contact { grid-template-columns: 1fr; }
}

.contact__coordonnees {
  background: var(--fond-carte);
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 1.4rem;
}
.contact__coordonnees h2 { margin: 0 0 .6rem; font-size: 1.15rem; }
.contact__coordonnees p { margin: 0 0 .7rem; }

.champ { margin: 0 0 1rem; display: flex; flex-direction: column; gap: .3rem; }
.champ label { font-weight: 600; font-size: .95rem; }
.requis { color: var(--accent); }

.champ input, .champ textarea {
  font: inherit;
  color: var(--texte);
  background: var(--fond-carte);
  border: 1px solid var(--bord);
  border-radius: 8px;
  padding: .6rem .7rem;
  width: 100%;
}

.champ input:focus, .champ textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.piege { position: absolute; left: -9999px; }

.message { border-radius: var(--rayon); padding: 1rem 1.2rem; margin-bottom: 1.5rem; }
.message p { margin: 0; }
.message ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.message--ok { background: #e7f4ec; border: 1px solid #b6dcc5; color: #1c5334; }
.message--erreur { background: var(--accent-clair); border: 1px solid var(--accent); color: var(--accent-fonce); }

@media (prefers-color-scheme: dark) {
  .message--ok { background: #16281d; border-color: #2c5540; color: #bfe3cd; }
}

/* Boutons ------------------------------------------------------------- */
.bouton {
  display: inline-block;
  padding: .65rem 1.3rem;
  border-radius: var(--rayon);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  font-size: 1rem;
  border: 2px solid var(--accent);
  cursor: pointer;
  font-family: inherit;
}
.bouton:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); }

.bouton--creux { background: transparent; color: #fff; border-color: #56646f; }
.bouton--creux:hover { background: #ffffff1a; border-color: #ffffff80; }

/* Pied ---------------------------------------------------------------- */
.pied {
  background: var(--encre);
  color: #b9c4ce;
  margin-top: 3rem;
  padding: 2.25rem 0 1.25rem;
  font-size: .95rem;
}

.pied a { color: #e5ebf0; }
.pied p { margin: 0 0 .3rem; }
.pied__nom { font-weight: 700; color: #fff; font-size: 1.05rem; }

.pied__grille {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  padding-bottom: 1.5rem;
}

.pied__bas {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.5rem;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid #2a343e;
  padding-top: 1rem;
}

/* Version et date de compilation : presentes mais discretes. Pour les retirer,
   supprimer ce bloc et le paragraphe correspondant dans partials/pied.html. */
.pied__version { font-size: .8rem; opacity: .7; }
