/* ==========================================================================
   Rainbow Hydrogen — feuille de style unique
   Polices attendues en local : voir RECETTE.md (assets/fonts/*.woff2)
   ========================================================================== */

/* --- Polices ------------------------------------------------------------- */
@font-face {
  font-family: "Comfortaa";
  src: url("../fonts/comfortaa-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Comfortaa";
  src: url("../fonts/comfortaa-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Baloo Bhai 2";
  src: url("../fonts/baloobhai2-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Baloo Bhai 2";
  src: url("../fonts/baloobhai2-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../fonts/opensans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../fonts/opensans-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../fonts/opensans-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* --- Jetons -------------------------------------------------------------- */
:root {
  --bleu: #1b80c0;
  --bleu-titre: #335ba6;
  --bleu-nuit: #292c65;
  --vert: #90c02c;
  --vert-2: #45a66f;
  --creme: #f0f4e1;
  --texte: #282828;
  --texte-2: #424242;
  --texte-3: #666;
  --blanc: #fff;

  --titre: "Comfortaa", "Trebuchet MS", "Segoe UI", sans-serif;
  --nav: "Baloo Bhai 2", "Trebuchet MS", "Segoe UI", sans-serif;
  --corps: "Open Sans", "Segoe UI", Helvetica, Arial, sans-serif;

  --r-10: 10px;
  --r-20: 20px;
  --ombre: 0 2px 18px rgba(0, 0, 0, .3);
  --ombre-douce: 0 2px 12px rgba(0, 0, 0, .12);
  --header-h: 124px;
  --largeur: 1080px;
}

/* --- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding-top: var(--header-h);
  font-family: var(--corps);
  font-size: 15px;
  line-height: 1.7;
  color: var(--texte-2);
  background: var(--blanc);
  overflow-x: hidden;
  text-wrap: pretty;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--titre);
  margin: 0;
  line-height: 1.25;
  color: var(--bleu-titre);
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.container {
  width: 100%;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- En-tête ------------------------------------------------------------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: var(--blanc);
  box-shadow: 0 1px 6px rgba(0, 0, 0, .1);
}

.header__inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}

.header__logo { display: block; }
.header__logo img { width: auto; height: 58px; }

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  font-family: var(--nav);
  font-size: 15px;
  font-weight: 600;
  color: var(--bleu);
  letter-spacing: .01em;
}

.nav a:hover { color: var(--vert); }
.nav__item--current a { color: var(--vert); }

/* Recherche du thème retirée (5 pages) — voir RECETTE.md */

.burger {
  display: none;
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--bleu);
  cursor: pointer;
}
.burger__bar {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  transition: transform .22s ease, opacity .22s ease;
}
.burger[aria-expanded="true"] .burger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__bar:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Sections ------------------------------------------------------------ */
.section {
  padding: 72px 0;
  overflow-x: clip;
}
.section--serre { padding: 48px 0; }

.section-title { margin-bottom: 40px; }
.section-title__sur {
  font-family: var(--titre);
  font-size: 25px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--bleu-nuit);
  margin: 0;
}
.section-title__main {
  font-family: var(--titre);
  font-size: 40px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .01em;
  color: var(--bleu-titre);
  margin: 0;
}
.section-title--dark .section-title__sur,
.section-title--dark .section-title__main { color: var(--blanc); }
.section-title--center { text-align: center; }
.section-title p { margin-top: 16px; color: var(--texte-2); }

/* --- Héros --------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 96px 0 88px;
  text-align: center;
  color: var(--blanc);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .25);

  background-image: url("../img/cover-reunion-1.jpg");
  background-size: cover; background-position: center;
  background-blend-mode: multiply;
}
.hero--accueil { background-color: #6f9727; }
.hero--bleu { background-color: #1b80c0; }

.hero h1 {
  font-family: var(--titre);
  font-size: 52px;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--blanc);
  margin: 0 auto;
  max-width: 900px;
}
.hero p {
  margin: 24px auto 0;
  max-width: 680px;
  font-size: 17px;
  color: var(--blanc);
}

/* --- Bandeau ------------------------------------------------------------- */
.bandeau { padding: 64px 0; text-align: center; }
.bandeau h2 {
  font-family: var(--titre);
  font-size: 34px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--bleu-titre);
  max-width: 900px;
  margin: 0 auto;
}

/* --- Grilles ------------------------------------------------------------- */
.grid { display: grid; gap: 40px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--2-3 { grid-template-columns: 2fr 3fr; align-items: center; }
.grid--1-2 { grid-template-columns: 1fr 2fr; align-items: center; }
.grid--1-3 { grid-template-columns: 1fr 3fr; align-items: center; gap: 32px; }
.grid--3-2 { grid-template-columns: 3fr 2fr; align-items: center; }

/* --- Image ronde --------------------------------------------------------- */
.ronde {
  border-radius: 50%;
  border: 7px solid var(--blanc);
  box-shadow: var(--ombre);
  overflow: hidden;
}
.ronde img { border-radius: 50%; }

/* --- Blocs de texte (blurbs) -------------------------------------------- */
.blocs { display: grid; gap: 32px; }

.bloc__titre {
  font-family: var(--titre);
  font-size: 20px;
  font-weight: 700;
  color: var(--bleu-titre);
  margin: 0 0 10px;
}
.bloc p { font-size: 15px; }

/* Bloc à icône à gauche */
.bloc--icone {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  align-items: start;
}
.bloc__icone {
  width: 48px;
  height: 48px;
  color: var(--vert);
}
.bloc__icone svg { width: 100%; height: 100%; }

/* --- Section « bénéfices » : carte crème -------------------------------- */
.benefices {
  background-color: #e8efd6;
  background-image: url("../img/fond-vert.png"); 
  padding: 80px 0;
  overflow-x: clip;
}
.benefices__carte {
  background: var(--creme);
  border-radius: var(--r-20);
  padding: 56px 48px;
  box-shadow: var(--ombre-douce);
}

/* --- Cartes (3 colonnes accueil) ---------------------------------------- */
.carte {
  background: var(--blanc);
  border-radius: var(--r-20);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--ombre-douce);
  transition: transform .22s ease, box-shadow .22s ease;
  height: 100%;
}
.carte:hover {
  transform: rotate(-2deg);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .16);
}
.carte:nth-child(even):hover { transform: rotate(2deg); }
.carte__icone {
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  color: var(--vert);
}
.carte__icone svg { width: 100%; height: 100%; }
.carte__titre {
  font-family: var(--titre);
  font-size: 20px;
  font-weight: 700;
  color: var(--bleu-titre);
  margin: 0 0 12px;
}

/* --- Section « électrolyse » (fond bleu, séparateurs en biais) ---------- */
.electrolyse {
  position: relative;
  background-color: #17709e; 
  background-image: url("../img/cover-hydro.jpg"); 
  padding: 130px 0 140px;
  color: var(--blanc);
  overflow-x: clip;
}
.electrolyse::before,
.electrolyse::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 90px;
  background: var(--blanc);
}
.electrolyse::before {
  top: -1px;
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 100%);
}
.electrolyse::after {
  bottom: -1px;
  clip-path: polygon(0 100%, 100% 0, 100% 100%, 0 100%);
}
.electrolyse .section-title__sur,
.electrolyse .section-title__main { color: var(--blanc); }

.etape {
  background: var(--blanc);
  border-radius: var(--r-20);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--ombre);
  height: 100%;
}
.etape img { margin: 0 auto 18px; max-height: 130px; width: auto; }
.etape__titre {
  font-family: var(--titre);
  font-size: 17px;
  font-weight: 700;
  color: var(--bleu-titre);
  margin: 0 0 10px;
}
.etape p { font-size: 14px; color: var(--texte-2); }

/* --- Rangées image / texte (unité de production) ------------------------ */
.rangee { margin-bottom: 48px; }
.rangee:last-child { margin-bottom: 0; }
.rangee h3 {
  font-family: var(--titre);
  font-size: 24px;
  font-weight: 700;
  color: var(--bleu-titre);
  margin: 0 0 12px;
}

/* --- Bloc bleu plein ----------------------------------------------------- */
.bloc-bleu {
  background: var(--bleu);
  color: var(--blanc);
  border-radius: var(--r-20);
  padding: 48px 44px;
  height: 100%;
}
.bloc-bleu h2 {
  font-family: var(--titre);
  font-size: 30px;
  font-weight: 700;
  color: var(--blanc);
  margin: 0 0 20px;
}
.bloc-bleu p { color: rgba(255, 255, 255, .94); }

/* --- Texte justifié ----------------------------------------------------- */
.justifie { text-align: justify; }
.titre-vert { color: var(--vert-2) !important; }

/* --- Article long (mentions légales) ------------------------------------ */
.prose { max-width: 820px; }
.prose h2 {
  font-family: var(--titre);
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--bleu-titre);
  margin: 44px 0 16px;
}
.prose h3 {
  font-family: var(--titre);
  font-size: 18px;
  font-weight: 700;
  color: var(--bleu-nuit);
  margin: 28px 0 10px;
}
.prose > *:first-child { margin-top: 0; }

/* --- Contact ------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 2fr 3fr; gap: 56px; align-items: start; }
.contact h3 {
  font-family: var(--titre);
  font-size: 26px;
  font-weight: 700;
  color: var(--bleu-titre);
  margin: 0 0 14px;
}
.coord { display: grid; gap: 22px; margin: 32px 0; }
.coord .bloc--icone { align-items: center; }
.coord a { color: var(--bleu-titre); font-weight: 600; }
.coord a:hover { color: var(--vert); }

/* --- Formulaire ---------------------------------------------------------- */
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--texte-2);
  margin-bottom: 6px;
}
.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%;
  font-family: var(--corps);
  font-size: 15px;
  color: var(--texte);
  background: var(--blanc);
  border: 1px solid var(--vert);
  border-radius: var(--r-10);
  padding: 13px 16px;
}
.form textarea { min-height: 170px; resize: vertical; }
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(27, 128, 192, .15);
}
.form__pot { position: absolute; left: -9999px; }

.bouton {
  display: inline-block;
  font-family: var(--nav);
  font-size: 16px;
  font-weight: 600;
  color: var(--blanc);
  background: var(--vert);
  border: 0;
  border-radius: var(--r-10);
  padding: 13px 34px;
  cursor: pointer;
  transition: background .18s ease;
}
.bouton:hover { background: #7ba824; color: var(--blanc); }

.form__msg {
  border-radius: var(--r-10);
  padding: 14px 18px;
  font-size: 14px;
}
.form__msg--ok { background: #eef6e0; color: #4a6b12; }
.form__msg--ko { background: #fdecec; color: #8a2020; }

/* --- LinkedIn ------------------------------------------------------------ */
.linkedin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--nav);
  font-size: 15px;
  font-weight: 600;
  color: var(--blanc);
  background: var(--bleu);
  border-radius: var(--r-10);
  padding: 10px 20px;
}
.linkedin:hover { background: var(--vert); color: var(--blanc); }
.linkedin svg { width: 20px; height: 20px; }
.linkedin--sur-bleu { background: rgba(255, 255, 255, .16); }
.linkedin--sur-bleu:hover { background: var(--vert); }

/* --- Pied de page -------------------------------------------------------- */
.footer {
  background: var(--bleu);
  color: var(--blanc);
  padding: 56px 0 40px;
  margin-top: 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer p { margin: 0; font-size: 14px; }
.footer a { color: var(--blanc); text-decoration: underline; }
.footer a:hover { color: var(--creme); }

/* --- Animations d'entrée ------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

.hero__anim { animation: rh-bounce 1s ease-in-out both; }
@keyframes rh-bounce {
  0%   { opacity: 0; transform: translateY(48px); }
  60%  { opacity: 1; transform: translateY(-10px); }
  80%  { transform: translateY(4px); }
  100% { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__anim { animation: none; }
}

/* --- Adaptatif ----------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { font-size: 42px; }
  .section-title__main { font-size: 34px; }
}

@media (max-width: 980px) {
  :root { --header-h: 96px; }
  .header__inner { flex-direction: row; justify-content: flex-start; }
  .header__logo img { height: 48px; }
  .burger { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--blanc);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
    padding: 8px 0;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a {
    display: block;
    padding: 14px 24px;
    min-height: 44px;
  }
  .nav__item + .nav__item { border-top: 1px solid rgba(0, 0, 0, .07); }
}

@media (max-width: 820px) {
  .grid--2, .grid--3, .grid--2-3, .grid--1-2, .grid--3-2,
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .grid--2-3 .ronde, .grid--1-2 .ronde { max-width: 360px; margin: 0 auto; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .benefices__carte { padding: 36px 24px; }
  .electrolyse { padding: 100px 0 110px; }
  .electrolyse::before, .electrolyse::after { height: 52px; }
  .bloc-bleu { padding: 36px 26px; }
  .grid--3-2 { gap: 28px; }
}

@media (max-width: 560px) {
  .hero { padding: 64px 0 56px; }
  .hero h1 { font-size: 32px; }
  .bandeau h2 { font-size: 26px; }
  .section { padding: 52px 0; }
  .section-title__sur { font-size: 20px; }
  .section-title__main { font-size: 27px; }
  .grid--4, .grid--1-3 { grid-template-columns: minmax(0, 1fr); }
  .grid--1-3 img { max-width: 200px; margin: 0 auto; }
}
