/* ==========================================================================
   Damel-IT — refonte 2026
   Direction : carte marine. Courbes de niveau (la mer devant Marseille, la
   structure d'une base de données), repères posés sur la carte, typographie
   expressive (Bricolage Grotesque) et texte de lecture à empattements
   (Source Serif 4). Une seule scène animée : le tracé des courbes du hero.
   ========================================================================== */

@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("../fonts/source-serif-4.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif";
  src: url("../fonts/source-serif-4-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --mer: #0b2239;          /* encre : texte, fonds sombres */
  --mer-profond: #071828;  /* pied de page */
  --ecume: #f3f7f9;        /* fond principal */
  --papier: #ffffff;       /* fond des sections alternées */
  --azur: #1aa7ec;         /* bleu du logo : tracés, accents graphiques */
  --azur-texte: #0a6ea8;   /* bleu lisible en texte sur fond clair (AA) */
  --corail: #ff6a45;       /* le seul repère chaud : Marseille sur la carte */
  --doux: #46596c;         /* texte secondaire */
  --filet: rgba(11, 34, 57, 0.16);

  --f-titre: "Bricolage", "Helvetica Neue", Arial, sans-serif;
  --f-texte: "Source Serif", Georgia, "Times New Roman", serif;

  --max: 78rem;
  --gouttiere: clamp(1.25rem, 4.5vw, 3.5rem);
  --entete: 4.75rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--entete) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ecume);
  color: var(--mer);
  font-family: var(--f-texte);
  font-size: 1.125rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }

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

.aller-au-contenu {
  position: absolute;
  left: var(--gouttiere);
  top: -4rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--mer);
  color: #fff;
  font-family: var(--f-titre);
  font-weight: 600;
  text-decoration: none;
}
.aller-au-contenu:focus { top: 0.75rem; }

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

/* ---------- Typographie ---------- */

.titre-section {
  font-family: var(--f-titre);
  font-weight: 780;
  font-stretch: 90%;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.texte-doux { color: var(--doux); }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--mer);
  border-radius: 0.4rem;
  background: transparent;
  color: var(--mer);
  font-family: var(--f-titre);
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s, border-color 0.18s;
}
.btn:hover { background: var(--mer); color: #fff; }

.btn--plein { background: var(--mer); color: #fff; }
.btn--plein:hover { background: var(--azur-texte); border-color: var(--azur-texte); }

.btn--clair { border-color: #fff; background: #fff; color: var(--mer); }
.btn--clair:hover { background: var(--azur); border-color: var(--azur); color: var(--mer); }

.btn--contour-clair { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn--contour-clair:hover { background: #fff; border-color: #fff; color: var(--mer); }

/* ---------- En-tête ---------- */

.entete {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--entete);
  transition: background-color 0.25s, box-shadow 0.25s;
}
.entete.est-defile {
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--filet);
}
.entete__ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 100%;
}
.logo { display: block; line-height: 0; }
.logo img {
  height: 2.9rem;
  width: auto;
}

.nav { display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 2.5rem); }
.nav__liste { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); }
.nav__lien {
  font-family: var(--f-titre);
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(var(--azur), var(--azur)) 0 100% / 0 2px no-repeat;
  padding-bottom: 0.15rem;
  transition: background-size 0.22s;
}
.nav__lien:hover,
.nav__lien[aria-current="true"] { background-size: 100% 2px; }

.nav .btn { min-height: 2.75rem; padding: 0.55rem 1.15rem; font-size: 1rem; }

.menu-bouton {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border: 2px solid var(--mer);
  border-radius: 0.4rem;
  background: transparent;
  color: var(--mer);
  font-family: var(--f-titre);
  font-size: 1rem;
  font-weight: 650;
  cursor: pointer;
}
.menu-bouton__barres,
.menu-bouton__barres::before {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s;
}
.menu-bouton__barres { position: relative; }
.menu-bouton__barres::before { content: ""; position: absolute; top: -0.35rem; left: 0; }
.menu-bouton[aria-expanded="true"] .menu-bouton__barres { transform: translateY(0.0px) rotate(45deg); }
.menu-bouton[aria-expanded="true"] .menu-bouton__barres::before { top: 0; transform: rotate(-90deg); }

/* ---------- Hero : la carte ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: max(100svh, 40rem);
  padding-top: calc(var(--entete) + 2rem);
  padding-bottom: clamp(3rem, 8vh, 6rem);
  overflow: hidden;
  isolation: isolate;
}

.hero__carte {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero__carte svg {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 100%;
  width: auto;
  aspect-ratio: 16 / 9;
  max-width: none;
  overflow: visible;
}

.c {
  fill: rgba(26, 167, 236, 0.017);
  stroke: var(--azur);
  stroke-opacity: 0.62;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.sonde-nombre {
  font-family: var(--f-titre);
  font-weight: 800;
  font-stretch: 85%;
  font-size: 58px;
  letter-spacing: -0.03em;
  fill: var(--mer);
  text-anchor: middle;
}
.sonde-legende {
  font-family: var(--f-titre);
  font-weight: 560;
  font-size: 23px;
  fill: var(--azur-texte);
  text-anchor: middle;
}
.sonde-nombre,
.sonde-legende,
.repere-nom {
  paint-order: stroke;
  stroke: var(--ecume);
  stroke-width: 12px;
  stroke-linejoin: round;
}
.repere-nom {
  font-family: var(--f-titre);
  font-weight: 650;
  font-size: 26px;
  fill: var(--mer);
}
.repere-point { fill: var(--corail); }
.repere-onde {
  fill: none;
  stroke: var(--corail);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
}

.hero__contenu { position: relative; width: 100%; }

.hero__titre {
  max-width: 10.2em;
  font-family: var(--f-titre);
  font-weight: 800;
  font-stretch: 92%;
  font-size: clamp(2.85rem, 6.7vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.024em;
  text-wrap: balance;
}
.hero__intro {
  max-width: 34rem;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.6;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
}

/* Le tracé des courbes : la seule animation déclenchée sans action de la personne */
@media (prefers-reduced-motion: no-preference) {
  .c {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    fill-opacity: 0;
    animation:
      trace 2.4s cubic-bezier(0.45, 0.05, 0.25, 1) forwards,
      remplit 1.2s ease-out forwards;
    animation-delay: calc(var(--i) * 70ms), calc(1.3s + var(--i) * 70ms);
  }
  .sonde,
  .repere { opacity: 0; animation: apparait 0.8s ease-out 2.2s forwards; }
  .repere-onde { animation: onde 3.2s ease-out 3s infinite; }
  .hero__titre,
  .hero__intro,
  .hero__actions { animation: monte 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero__intro { animation-delay: 0.12s; }
  .hero__actions { animation-delay: 0.22s; }
}
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes remplit { to { fill-opacity: 1; } }
@keyframes apparait { to { opacity: 1; } }
@keyframes monte { from { opacity: 0; transform: translateY(0.9rem); } }
@keyframes onde {
  0% { transform: scale(1); opacity: 0.9; }
  70%, 100% { transform: scale(5); opacity: 0; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(4.5rem, 10vw, 8.5rem); }
.section--papier { background: var(--papier); }

/* Produits */

.produits__entete {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
  max-width: 44rem;
}
.produits__entete p { color: var(--doux); }

.produit {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.25rem, 4vw, 4rem);
  padding-block: clamp(2rem, 4.5vw, 3.25rem);
  border-top: 1.5px solid var(--mer);
}
.produit:last-of-type { border-bottom: 1.5px solid var(--mer); }

.produit__nom {
  font-family: var(--f-titre);
  font-weight: 800;
  font-stretch: 90%;
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.026em;
}
.produit__genre {
  margin-top: 0.8rem;
  max-width: 22rem;
  font-family: var(--f-titre);
  font-size: 1.1875rem;
  font-weight: 560;
  line-height: 1.3;
  color: var(--azur-texte);
}
.produit__texte { max-width: 38rem; }
.produit__etiquettes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.etiquette {
  padding: 0.28rem 0.8rem;
  border: 1.5px solid var(--filet);
  border-radius: 999px;
  font-family: var(--f-titre);
  font-size: 0.9375rem;
  font-weight: 560;
  line-height: 1.4;
}
.produit__lien {
  display: inline-block;
  margin-top: 1.4rem;
  font-family: var(--f-titre);
  font-size: 1.0625rem;
  font-weight: 650;
  color: var(--mer);
  text-decoration: underline;
  text-decoration-color: var(--azur);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.3em;
  transition: text-decoration-color 0.15s, color 0.15s;
}
.produit__lien:hover { color: var(--azur-texte); text-decoration-color: var(--mer); }

.produit--ecrans { grid-template-columns: 1fr; }
.produit--ecrans .produit__tete {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.25rem, 4vw, 4rem);
}
.ecrans {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.75rem, 2.4vw, 1.75rem);
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem) 0;
  background: var(--ecume);
  overflow: hidden;
}
.ecran {
  flex: 1 1 0;
  max-width: 17rem;
  border: 0.45rem solid var(--mer);
  border-bottom: 0;
  border-radius: 1.5rem 1.5rem 0 0;
  overflow: hidden;
  background: var(--mer);
}
.ecran:nth-child(2) { margin-top: 2.5rem; }
.ecran img { width: 100%; height: auto; }

/* Services */

.services__grille {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: start;
}
.services__titre { position: sticky; top: calc(var(--entete) + 2rem); display: grid; gap: 1.25rem; }
.services__titre p { color: var(--doux); max-width: 26rem; }

.service {
  padding-block: clamp(1.75rem, 3.5vw, 2.5rem);
  border-top: 1.5px solid var(--mer);
}
.service:last-child { border-bottom: 1.5px solid var(--mer); }
.service__nom {
  font-family: var(--f-titre);
  font-weight: 760;
  font-stretch: 90%;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.service__texte { margin-top: 0.9rem; max-width: 40rem; }
.service .produit__etiquettes { margin-top: 1.1rem; }

/* À propos */

.apropos__grille {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.apropos__phrase {
  font-family: var(--f-titre);
  font-weight: 760;
  font-stretch: 88%;
  font-size: clamp(2.2rem, 4.9vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.apropos__corps { display: grid; gap: 1.25rem; }
.apropos__corps p { max-width: 36rem; }
.apropos__corps strong { font-weight: 650; }
.apropos__faits {
  margin-top: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1.5px solid var(--mer);
  font-family: var(--f-titre);
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  font-weight: 560;
  line-height: 1.28;
  letter-spacing: -0.01em;
}
.apropos__faits b { font-weight: 800; color: var(--azur-texte); }

/* Contact */

.contact {
  position: relative;
  background: var(--mer);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.contact__courbes {
  position: absolute;
  inset: auto -10% -35% auto;
  z-index: -1;
  width: min(60rem, 120vw);
  opacity: 0.4;
  pointer-events: none;
}
.contact__courbes .c { fill: none; stroke: var(--azur); stroke-opacity: 0.5; animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }

.contact__grille {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
}
.contact__titre {
  font-family: var(--f-titre);
  font-weight: 800;
  font-stretch: 92%;
  font-size: clamp(2.7rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.026em;
  text-wrap: balance;
}
.contact__intro { margin-top: 1.5rem; max-width: 30rem; color: rgba(255, 255, 255, 0.82); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

.coordonnees { display: grid; gap: 1.5rem; }
.coordonnees dt {
  font-family: var(--f-titre);
  font-size: 0.9375rem;
  font-weight: 560;
  color: var(--azur);
}
.coordonnees dd { margin-top: 0.15rem; font-size: 1.1875rem; line-height: 1.45; }
.coordonnees a { text-decoration-color: rgba(255, 255, 255, 0.4); text-underline-offset: 0.25em; }
.coordonnees a:hover { text-decoration-color: var(--azur); }

/* Pied de page */

.pied { background: var(--mer-profond); color: rgba(255, 255, 255, 0.78); padding-block: 3rem 2rem; }
.pied__grille {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2rem 4rem;
}
.pied__marque {
  font-family: var(--f-titre);
  font-weight: 800;
  font-stretch: 84%;
  font-size: 2rem;
  letter-spacing: -0.03em;
  color: #fff;
}
.pied__marque span { color: var(--azur); }
.pied__slogan { margin-top: 0.6rem; max-width: 24rem; font-size: 1rem; }
.pied__liens {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  align-content: start;
  justify-content: flex-end;
  font-family: var(--f-titre);
  font-size: 1.0625rem;
  font-weight: 560;
}
.pied__liens a { text-decoration: none; }
.pied__liens a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--azur); text-underline-offset: 0.3em; }
.pied__bas {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.9375rem;
}

/* ---------- Page de confidentialité ---------- */

.page-texte { padding-top: calc(var(--entete) + clamp(2.5rem, 6vw, 5rem)); padding-bottom: clamp(4rem, 8vw, 7rem); }
.page-texte__corps { max-width: 46rem; }
.page-texte h1 {
  font-family: var(--f-titre);
  font-weight: 800;
  font-stretch: 88%;
  font-size: clamp(2.3rem, 5.5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.page-texte .maj { margin-top: 1rem; color: var(--doux); font-size: 1rem; }
.page-texte h2 {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1.5px solid var(--mer);
  font-family: var(--f-titre);
  font-weight: 760;
  font-stretch: 90%;
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.page-texte h3 {
  margin-top: 1.75rem;
  font-family: var(--f-titre);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}
.page-texte p,
.page-texte ul { margin-top: 1rem; }
.page-texte ul { padding-left: 1.25rem; list-style: disc; }
.page-texte li + li { margin-top: 0.4rem; }
.page-texte a { color: var(--azur-texte); text-underline-offset: 0.2em; }
.page-texte .ecrans { margin-top: 2rem; max-width: 40rem; }

/* ---------- Mobile ---------- */

@media (max-width: 62rem) {
  .produit,
  .produit--ecrans .produit__tete,
  .services__grille,
  .apropos__grille,
  .contact__grille,
  .pied__grille { grid-template-columns: 1fr; }
  .services__titre { position: static; }
  .pied__liens { justify-content: flex-start; }
  .contact__grille { align-items: start; }
}

@media (max-width: 52rem) {
  .menu-bouton { display: inline-flex; }
  .nav {
    position: fixed;
    inset: var(--entete) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.5rem var(--gouttiere) 2rem;
    background: var(--papier);
    box-shadow: 0 1px 0 var(--filet), 0 1.5rem 2rem -1rem rgba(11, 34, 57, 0.25);
    transform: translateY(-120%);
    visibility: hidden;
    transition: transform 0.25s, visibility 0s 0.25s;
  }
  .nav.est-ouvert { transform: none; visibility: visible; transition: transform 0.25s; }
  .nav__liste { flex-direction: column; gap: 0.25rem; }
  .nav__lien { display: block; padding: 0.7rem 0; font-size: 1.375rem; background: none; }
  .entete.menu-ouvert { background: var(--papier); }

  .hero { align-items: flex-start; padding-top: calc(var(--entete) + 2.5rem); }
  .hero__carte svg { height: 64%; top: auto; bottom: -3%; }
  .sonde { display: none; }
  .hero__contenu { padding-bottom: 0; }
  .hero__intro { max-width: 100%; }
}

@media (max-width: 34rem) {
  body { font-size: 1.0625rem; }
  .hero__actions .btn,
  .contact__actions .btn { width: 100%; }
  .ecrans { padding-inline: 0.9rem; }
  .ecran { border-width: 0.3rem; border-radius: 1rem 1rem 0 0; }
  .ecran:nth-child(3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}
