:root {
  --nuit: #16293A;
  --nuit-2: #20374C;
  --vert: #81A61B;
  --vert-fonce: #5F7A14;
  --vert-clair: #A9C94A;
  --page: #FBFBF8;
  --pale: #F2F6E8;
  --blanc: #FFFFFF;
  --texte-2: #3D4C5C;
  --filet: #E3E8D8;
  --sur-nuit: #D5DEE6;

  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;

  --gouttiere: clamp(16px, 5vw, 64px);
  --largeur: 1152px;

  /* Créneaux : proportions du sommet de la tour du logo (merlon 6,2 / créneau 3,8 / hauteur 6,5), x4 */
  --merlon: 62px;
  --pas: 100px;
  --creneau-h: 65px;
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--nuit);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--vert-fonce); text-underline-offset: 3px; }
a:hover { color: var(--nuit); }

:focus-visible {
  outline: 3px solid var(--vert);
  outline-offset: 3px;
  border-radius: 2px;
}

.evitement {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--blanc);
  color: var(--nuit);
  font-weight: 700;
}
.evitement:focus { top: 16px; }

.cadre {
  width: 100%;
  max-width: calc(var(--largeur) + 2 * var(--gouttiere));
  margin: 0 auto;
  padding: 0 var(--gouttiere);
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  max-width: 26ch;
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

p { margin: 0; }

.chapeau {
  font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.55;
  color: var(--texte-2);
  max-width: 62ch;
}

/* Boutons */
.bouton {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 26px;
  border-radius: 6px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.bouton--vert { background: var(--vert); color: var(--nuit); }
.bouton--vert:hover { background: var(--vert-clair); color: var(--nuit); }
.bouton--nuit { background: var(--nuit); color: var(--blanc); }
.bouton--nuit:hover { background: var(--nuit-2); color: var(--blanc); }
.bouton--contour { border-color: currentColor; color: var(--blanc); }
.bouton--contour:hover { background: var(--blanc); border-color: var(--blanc); color: var(--nuit); }

/* Bandeau Darkmira Service */
.bandeau {
  display: block;
  padding: 12px var(--gouttiere);
  background: var(--vert);
  color: var(--nuit);
  font-size: 16px;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
}
.bandeau:hover { background: var(--vert-clair); color: var(--nuit); }
.bandeau span { text-decoration: underline; text-underline-offset: 3px; }

/* En-tête et hero : le rempart */
.rempart {
  position: relative;
  overflow: hidden;
  background: var(--nuit);
  color: var(--blanc);
}

.rempart::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: var(--creneau-h);
  background: linear-gradient(to right, var(--page) 0 var(--merlon), transparent var(--merlon) var(--pas)) 0 0 / var(--pas) 100% repeat-x;
}

.entete {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
}

.entete__logo { color: var(--blanc); }
.entete__logo svg { width: 170px; height: auto; }

.entete nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 17px;
  font-weight: 600;
}
.entete nav a:not(.bouton) { color: var(--blanc); text-decoration: none; }
.entete nav a:not(.bouton):hover { color: var(--vert-clair); }
.entete .bouton { min-height: 44px; padding: 8px 18px; font-size: 16px; }

.hero {
  position: relative;
  z-index: 2;
  padding-top: clamp(72px, 10vw, 128px);
  padding-bottom: calc(clamp(88px, 11vw, 144px) + var(--creneau-h));
}

.hero h1 {
  font-size: clamp(42px, 6.4vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.hero .chapeau {
  margin-top: 28px;
  color: var(--sur-nuit);
  max-width: 54ch;
}

.hero__tour {
  position: absolute;
  z-index: 1;
  right: max(-120px, calc((100vw - var(--largeur)) / 2 - 220px));
  bottom: calc(var(--creneau-h) - 150px);
  width: clamp(420px, 52vw, 760px);
  height: auto;
  pointer-events: none;
}
.hero__tour .t { fill: var(--nuit-2); }
.hero__tour .m { fill: var(--vert); }

/* Sections */
.section { padding: clamp(72px, 9vw, 120px) 0; }

.charte__tete {
  display: grid;
  gap: 18px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.esprits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3.5vw, 56px);
}

.esprits article {
  padding-top: 24px;
  border-top: 3px solid var(--vert);
}

.esprits h3 {
  font-size: 25px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.esprits__intro { color: var(--nuit); margin-bottom: 22px; }

.esprits dl { margin: 0; }
.esprits dt { font-weight: 700; font-size: 17px; }
.esprits dd { margin: 2px 0 16px; color: var(--texte-2); font-size: 17px; line-height: 1.5; }
.esprits dd:last-child { margin-bottom: 0; }

/* Ce que nous faisons */
.activites {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 5vw, 80px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.activites li { padding: 28px 0; border-top: 1px solid var(--filet); }
.activites h3 { font-size: 24px; line-height: 1.25; margin-bottom: 8px; }
.activites p { color: var(--texte-2); max-width: 46ch; }

/* Sécurité : les phases de la vie d'une application */
.phases {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: phase;
}
.phases li {
  counter-increment: phase;
  padding-top: 20px;
  border-top: 3px solid var(--nuit);
}
.phases li::before {
  content: counter(phase);
  display: block;
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  color: var(--vert-fonce);
}
.phases h3 { font-size: 22px; line-height: 1.25; margin-bottom: 8px; }
.phases p { color: var(--texte-2); font-size: 17px; line-height: 1.55; }

/* Sections en deux colonnes : titre à gauche, liste à droite */
.blanc { background: var(--blanc); border-top: 1px solid var(--filet); border-bottom: 1px solid var(--filet); }

.colonnes {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.colonnes__tete { display: grid; gap: 18px; }
.colonnes__tete .chapeau { color: var(--nuit); }

.liste-filets { margin: 0; padding: 0; list-style: none; }
.liste-filets li { padding: 24px 0; border-top: 1px solid var(--filet); }
.liste-filets li:first-child { padding-top: 0; border-top: 0; }
.liste-filets h3 { font-size: 22px; line-height: 1.25; margin-bottom: 8px; }
.liste-filets p { color: var(--texte-2); }

.engagement { background: var(--pale); }
.engagement .liste-filets li { border-top-color: #D6DEC4; }

.offre {
  background: var(--nuit);
  color: var(--blanc);
}

.offre .cadre {
  display: grid;
  gap: 32px;
  justify-items: start;
}

.offre__nom {
  margin-bottom: 14px;
  color: var(--vert-clair);
  font-weight: 700;
  font-size: 18px;
}

.offre h2 { max-width: 24ch; }

.offre p.chapeau {
  margin-top: 18px;
  color: var(--sur-nuit);
}


.contact { background: var(--pale); }

.contact .cadre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
}

/* Pied de page */
.pied {
  padding: 48px 0;
  background: var(--nuit);
  color: #C9D3DD;
  font-size: 16px;
}

.pied .cadre {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px 48px;
}

.pied__nom {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--blanc);
}

.pied nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.pied a { color: #C9D3DD; text-decoration: none; }
.pied a:hover { color: var(--blanc); text-decoration: underline; }

/* Page 404 */
.perdu {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.perdu .hero { flex-grow: 1; }
.perdu .hero .bouton { margin-top: 36px; }

@media (max-width: 900px) {
  .esprits { grid-template-columns: 1fr; }
  .colonnes, .activites { grid-template-columns: 1fr; }
  .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .hero__tour { opacity: .55; }
}

@media (max-width: 600px) {
  body { font-size: 17px; }
  .entete { flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
  .entete nav { gap: 20px; width: 100%; justify-content: space-between; }
  .entete__logo svg { width: 140px; }
  .hero__tour { right: -140px; width: 380px; opacity: .4; }
  .bouton { width: 100%; justify-content: center; }
  .entete .bouton { width: auto; }
  :root { --merlon: 31px; --pas: 50px; --creneau-h: 33px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media (max-width: 600px) {
  .entete { flex-wrap: nowrap; }
  .entete nav { width: auto; }
  .entete nav a:not(.bouton) { display: none; }
}

/* Mentions légales */
.hero.hero--court {
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: calc(clamp(48px, 6vw, 80px) + var(--creneau-h));
}
.legal { display: grid; gap: 48px; }
.legal > section { max-width: 760px; }
.legal section { display: grid; gap: 14px; }
.legal h2 { font-size: clamp(24px, 2.6vw, 30px); }
.legal p { color: var(--texte-2); max-width: 66ch; }
.legal dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 32px;
  margin: 8px 0 0;
}
.legal dt { font-weight: 700; }
.legal dd { margin: 0; color: var(--texte-2); }

@media (max-width: 600px) {
  .legal dl { grid-template-columns: 1fr; gap: 2px; }
  .legal dd { margin-bottom: 12px; }
}

@media (max-width: 600px) {
  .phases { grid-template-columns: 1fr; }
}

/* Page Audits */
.texte { display: grid; gap: 20px; }
.texte p { color: var(--texte-2); max-width: 64ch; }
.texte p.encadre {
  padding: 24px 28px;
  background: var(--pale);
  border-left: 4px solid var(--vert);
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 500;
  line-height: 1.4;
  color: var(--nuit);
}

.activites li p + p { margin-top: 10px; }
.activites a { font-weight: 700; }

.audits {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr);
  gap: clamp(24px, 3vw, 48px);
}
.audits article { padding-top: 24px; border-top: 1px solid var(--filet); }
.audits .audits__principal { border-top: 3px solid var(--vert); }
.audits h3 { font-size: 25px; line-height: 1.2; margin-bottom: 12px; }
.audits p { color: var(--texte-2); }
.audits ul { margin: 14px 0 0; padding-left: 20px; color: var(--texte-2); display: grid; gap: 4px; }
.audits li::marker { color: var(--vert-fonce); }

.carte { margin: 0; display: grid; gap: 28px; }
.carte__zone {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr auto;
  gap: 10px 14px;
  max-width: 420px;
}
.carte__axe { font-size: 15px; font-weight: 700; color: var(--texte-2); }
.carte__axe--y { writing-mode: vertical-rl; transform: rotate(180deg); align-self: center; }
.carte__axe--x { grid-column: 2; justify-self: end; }
.carte__grille {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  aspect-ratio: 1;
  border-left: 2px solid var(--nuit);
  border-bottom: 2px solid var(--nuit);
  padding: 0 0 3px 3px;
}
.carte__grille span { border-radius: 3px; }
.g-critique { background: #B8452E; }
.g-eleve { background: #DE8A3A; }
.g-moyen { background: #EBCB5A; }
.g-reduit { background: var(--vert); }

.carte__legende { margin: 0; display: grid; gap: 10px; }
.carte__legende div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: baseline; }
.carte__legende dt { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.carte__legende dt span { flex: none; width: 14px; height: 14px; border-radius: 3px; }
.carte__legende dd { margin: 0; color: var(--texte-2); font-size: 16px; }

.entete nav a[aria-current="page"] { color: var(--vert-clair); }

@media (max-width: 900px) {
  .audits { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .carte__legende div { grid-template-columns: 1fr; gap: 2px; }
}

/* En-tête : le logo garde sa taille, les liens laissent la place au bouton sur tablette */
.entete__logo { flex: none; }
.entete nav a { white-space: nowrap; }
@media (max-width: 900px) {
  .entete nav a:not(.bouton) { display: none; }
}

.audits__renvoi {
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: 24px;
  border-top: 1px solid var(--filet);
  color: var(--texte-2);
}
.audits__renvoi a { font-weight: 700; }
