/* ==========================================================================
   Marinassist — feuille de style unique
   Direction : impression artisanale / risographie. Papier, encre, décalage.
   Règles d'or (à ne pas transgresser en ajoutant des pages) :
     - Aucune icône emoji. Aucune étoile décorative.
     - Aucun dégradé, aucune tache floue, aucune ombre portée diffuse.
     - Aucun titre en italique décoratif.
     - Les animations sont interdites sauf pour un retour d'interaction.
   ========================================================================== */

/* --- 1. Jetons ---------------------------------------------------------- */

:root {
  --papier:        #F2EDE3;
  --papier-fonce:  #E7DFCF;
  --craie:         #FBF8F2;
  --encre:         #17140F;
  --encre-doux:    #514A3F;
  --encre-tres-doux:#7C7365;

  --rose:          #C4436B;   /* encre rose, saturée, imprimée — pas pastel */
  --rose-sombre:   #97284B;
  --rose-clair:    #F1CCD6;
  --rose-pale:     #F9E8EC;
  --sauge:         #6E7F55;
  --sauge-pale:    #DCE2CE;

  --trait:         #17140F;
  --trait-fin:     rgba(23, 20, 15, .22);

  --titre:         'Fraunces', 'Iowan Old Style', Georgia, serif;
  --texte:         'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --main:          'Caveat', 'Segoe Script', cursive;

  --largeur:       72rem;
  --gouttiere:     clamp(1.25rem, 5vw, 4rem);
}

/* --- 2. Base ------------------------------------------------------------ */

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

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

body {
  font-family: var(--texte);
  font-size: clamp(1rem, .96rem + .2vw, 1.09rem);
  line-height: 1.65;
  color: var(--encre);
  background: var(--papier);
  font-variant-numeric: oldstyle-nums;
}

/* Grain de papier : superposition unique, non interactive, en multiply.
   Généré en SVG inline — aucun fichier externe, aucun coût réseau. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .55;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23g)' opacity='.55'/%3E%3C/svg%3E");
}

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

a { color: var(--rose-sombre); text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--encre); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }

::selection { background: var(--rose-clair); color: var(--encre); }

/* --- 3. Typographie ----------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--titre);
  font-weight: 600;
  font-variation-settings: 'SOFT' 30, 'WONK' 1;  /* Fraunces : légèrement irrégulier */
  line-height: 1.05;
  letter-spacing: -.015em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 1.6rem + 4.4vw, 5.2rem); }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.1rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); line-height: 1.2; }

p { text-wrap: pretty; }
p + p { margin-top: 1em; }

.deck {
  font-size: clamp(1.1rem, 1rem + .55vw, 1.42rem);
  line-height: 1.5;
  color: var(--encre-doux);
  max-width: 34ch;
}

.prose { max-width: 62ch; }
.prose p + p,
.prose ul + p,
.prose p + ul { margin-top: 1.1em; }
.prose ul { margin-left: 1.1em; }
.prose li + li { margin-top: .35em; }
.prose h3 { margin: 2.2em 0 .6em; }

/* Annotation manuscrite — usage strictement marginal, jamais pour du contenu
   important : cette police n'est pas lisible par tous. */
.note {
  font-family: var(--main);
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--rose-sombre);
  transform: rotate(-2.2deg);
  display: inline-block;
}
.note--droite { transform: rotate(1.8deg); }

/* Surlignage au feutre. Le dégradé à seuil se recale sur chaque ligne du texte,
   contrairement à un background-position fixe qui glisse sous la seconde ligne. */
.feutre {
  background-image: linear-gradient(transparent 48%, var(--rose-clair) 48%, var(--rose-clair) 88%, transparent 88%);
  padding: 0 .12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* --- 4. Mise en page ---------------------------------------------------- */

.enveloppe { max-width: var(--largeur); margin-inline: auto; padding-inline: var(--gouttiere); }

section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
section + section { border-top: 1px solid var(--trait-fin); }

.bande-papier  { background: var(--craie); }
.bande-rose    { background: var(--rose-pale); }
.bande-encre   { background: var(--encre); color: var(--papier); }
.bande-encre h2, .bande-encre h3 { color: var(--craie); }
.bande-encre a { color: var(--rose-clair); }

/* Entête de section : numéro en marge + filet, comme un chemin de fer imprimé */
.entete { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.entete__num {
  font-family: var(--main);
  font-size: 1.6rem;
  color: var(--rose);
  display: block;
  margin-bottom: .1em;
}
.entete__filet {
  border: 0;
  border-top: 2px solid var(--trait);
  margin: .9rem 0 1.1rem;
  max-width: 4.5rem;
}
.entete p { color: var(--encre-doux); max-width: 52ch; margin-top: .8rem; }

.duo { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 60rem) {
  .duo { grid-template-columns: 1fr 1fr; align-items: start; }
  .duo--asym { grid-template-columns: 1.15fr .85fr; }
  .duo--asym-inv { grid-template-columns: .85fr 1.15fr; }
}

/* --- 5. Entête du site -------------------------------------------------- */

.site-entete {
  border-bottom: 2px solid var(--trait);
  background: var(--papier);
  position: sticky; top: 0; z-index: 50;
}
.site-entete__interieur {
  max-width: var(--largeur); margin-inline: auto;
  padding: .85rem var(--gouttiere);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.marque { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--encre); }

/* Marque nuage + ampoule. Le fichier fourni est un carré de 800 px qui contient
   aussi le nom et une illustration ; on n'affiche que le pictogramme en cadrant
   par CSS, plutôt que de dupliquer le nom déjà écrit à côté en typographie. */
.marque__signe {
  flex: none;
  width: 2.5rem; height: 2.5rem;
  background-image: url("/assets/img/logo-marinassist.png");
  background-repeat: no-repeat;
  background-size: 420% auto;      /* zoom sur le nuage */
  background-position: 49% 22%;
}
.marque__nom { font-family: var(--titre); font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; }
.marque__lieu { display: block; font-family: var(--texte); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--encre-tres-doux); }

.nav { display: none; }
@media (min-width: 62rem) { .nav { display: flex; align-items: center; gap: 1.6rem; } }
.nav a { font-size: .92rem; text-decoration: none; color: var(--encre-doux); border-bottom: 2px solid transparent; padding-bottom: .15em; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--encre); border-bottom-color: var(--rose); }

/* Navigation mobile : <details> natif, sans JavaScript */
.nav-mobile { position: relative; }
@media (min-width: 62rem) { .nav-mobile { display: none; } }
.nav-mobile > summary {
  list-style: none; cursor: pointer;
  border: 2px solid var(--trait); padding: .4rem .8rem;
  font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
}
.nav-mobile > summary::-webkit-details-marker { display: none; }
.nav-mobile__panneau {
  position: absolute; right: 0; top: calc(100% + .5rem); z-index: 60;
  background: var(--craie); border: 2px solid var(--trait);
  min-width: 15rem; padding: .5rem 0;
}
.nav-mobile__panneau a { display: block; padding: .55rem 1.1rem; text-decoration: none; color: var(--encre); }
.nav-mobile__panneau a:hover { background: var(--rose-pale); }

/* --- 6. Boutons --------------------------------------------------------- */

.bouton {
  display: inline-block;
  font-family: var(--texte); font-size: .95rem; font-weight: 500;
  padding: .8rem 1.5rem;
  border: 2px solid var(--trait);
  background: var(--rose); color: var(--craie);
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--trait);   /* ombre dure, jamais floue */
  transition: transform .12s ease, box-shadow .12s ease;
}
.bouton:hover {
  color: var(--craie);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--trait);
}
.bouton:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--trait); }
.bouton--creux { background: transparent; color: var(--encre); }
.bouton--creux:hover { color: var(--encre); background: var(--rose-pale); }
.boutons { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* --- 7. Bloc « En bref » (réponse directe, lue par les moteurs génératifs) */

.en-bref {
  border: 2px solid var(--trait);
  background: var(--craie);
  padding: clamp(1.25rem, 3vw, 2rem);
  max-width: 60ch;
}
.en-bref__titre {
  font-family: var(--texte);
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--rose-sombre);
  border-bottom: 1px solid var(--trait-fin);
  padding-bottom: .5rem; margin-bottom: .9rem;
}
.en-bref p { font-size: 1.02rem; }

/* --- 8. Photos scotchées ------------------------------------------------ */

.photo { position: relative; background: var(--craie); padding: .7rem .7rem 3rem; border: 1px solid var(--trait-fin); box-shadow: 3px 4px 0 rgba(23,20,15,.12); }
.photo--gauche  { transform: rotate(-1.6deg); }
.photo--droite  { transform: rotate(1.3deg); }
.photo figcaption { position: absolute; bottom: .8rem; left: .9rem; right: .9rem; font-family: var(--main); font-size: 1.2rem; color: var(--encre-doux); line-height: 1.1; }
/* Le scotch */
.photo::before {
  content: ""; position: absolute; top: -.9rem; left: 50%;
  width: 5.5rem; height: 1.8rem; transform: translateX(-50%) rotate(-3deg);
  background: rgba(228, 214, 180, .75);
  border-left: 1px dashed rgba(23,20,15,.14);
  border-right: 1px dashed rgba(23,20,15,.14);
}

/* --- 9. Cas clients ----------------------------------------------------- */

/* Les cas clients sont traités comme des coupures de presse épinglées :
   rotation minime (sous 0,5°, sinon ça devient un gadget) et une pastille
   de scotch. La rotation est annulée par prefers-reduced-motion. */
.cas {
  position: relative;
  border: 2px solid var(--trait); background: var(--craie);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: 5px 5px 0 rgba(23, 20, 15, .1);
  transform: rotate(-.32deg);
}
.cas:nth-of-type(even) { transform: rotate(.28deg); }
.cas::before {
  content: ""; position: absolute; top: -.8rem; left: 2.5rem;
  width: 4.5rem; height: 1.6rem; transform: rotate(-4deg);
  background: rgba(226, 210, 172, .8);
  border-left: 1px dashed rgba(23, 20, 15, .16);
  border-right: 1px dashed rgba(23, 20, 15, .16);
}
.cas:nth-of-type(even)::before { left: auto; right: 2.5rem; transform: rotate(3deg); }
.cas + .cas { margin-top: 2.5rem; }
.cas__meta { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--encre-tres-doux); }
.cas__chiffre {
  font-family: var(--titre); font-weight: 600;
  font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem);
  line-height: 1; color: var(--rose-sombre);
  display: block; margin: .35rem 0 .2rem;
}
.cas__chiffre-legende { font-size: .95rem; color: var(--encre-doux); }
.cas__grille { display: grid; gap: 1.25rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--trait-fin); }
@media (min-width: 48rem) { .cas__grille { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.cas__etiquette { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--rose-sombre); display: block; margin-bottom: .4rem; }
.cas__grille p { font-size: .96rem; color: var(--encre-doux); }
.cas__source { margin-top: 1.25rem; font-size: .82rem; color: var(--encre-tres-doux); font-style: italic; }

/* --- 10. Services en lignes numérotées (jamais des cartes à icônes) ------ */

.service { display: grid; gap: .5rem 2rem; padding-block: clamp(1.5rem, 3vw, 2.25rem); border-top: 1px solid var(--trait-fin); }
.service:last-child { border-bottom: 1px solid var(--trait-fin); }
@media (min-width: 52rem) { .service { grid-template-columns: 4rem 1fr 15rem; align-items: start; } }
.service__num { font-family: var(--main); font-size: 1.7rem; color: var(--rose); line-height: 1; }
.service__titre { font-family: var(--titre); font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); font-weight: 600; }
.service__titre a { color: inherit; text-decoration: none; }
.service__titre a:hover { color: var(--rose-sombre); text-decoration: underline; }
.service p { color: var(--encre-doux); margin-top: .4rem; max-width: 52ch; }
.service__pour { font-size: .9rem; color: var(--encre-tres-doux); border-left: 2px solid var(--rose-clair); padding-left: .9rem; }
.service--neuf .service__num::after {
  content: "nouveau";
  display: inline-block; margin-left: .5rem; vertical-align: .35rem;
  font-family: var(--texte); font-size: .62rem; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--craie); background: var(--sauge);
  padding: .2rem .45rem;
}

/* --- 11. Tableaux (tarifs, comparatifs) — lus tels quels par les IA ------ */

.tableau-enveloppe { overflow-x: auto; border: 2px solid var(--trait); background: var(--craie); }
table { width: 100%; border-collapse: collapse; font-size: .96rem; min-width: 34rem; }
caption { text-align: left; padding: 1rem 1.1rem .25rem; font-family: var(--titre); font-size: 1.2rem; font-weight: 600; }
th, td { text-align: left; padding: .8rem 1.1rem; border-bottom: 1px solid var(--trait-fin); vertical-align: top; }
thead th { font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; color: var(--encre-tres-doux); border-bottom: 2px solid var(--trait); }
tbody tr:last-child td { border-bottom: 0; }
td.prix { font-family: var(--titre); font-weight: 600; font-size: 1.15rem; white-space: nowrap; color: var(--rose-sombre); }

/* --- 12. FAQ — <details> natif : accessible, indexable, sans JavaScript -- */

.faq { border-top: 1px solid var(--trait-fin); }
.faq details { border-bottom: 1px solid var(--trait-fin); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
  font-family: var(--titre); font-size: clamp(1.05rem, 1rem + .35vw, 1.28rem); font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .4rem; top: 50%; transform: translateY(-50%);
  font-family: var(--texte); font-size: 1.5rem; color: var(--rose); line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq summary:hover { color: var(--rose-sombre); }
.faq__reponse { padding: 0 0 1.35rem; max-width: 62ch; color: var(--encre-doux); }
.faq__reponse p + p { margin-top: .8em; }

/* --- 13. Zone d'intervention ------------------------------------------- */

.communes { list-style: none; display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.5rem; }
.communes li a, .communes li span {
  display: inline-block; padding: .35rem .85rem;
  border: 1px solid var(--trait); background: var(--craie);
  font-size: .88rem; text-decoration: none; color: var(--encre);
}
.communes li a:hover { background: var(--rose); color: var(--craie); }

/* --- 13 bis. Formulaires ------------------------------------------------ */

.champ { margin-bottom: 1.25rem; }
.champ label { display: block; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--encre-doux); margin-bottom: .4rem; }
.champ .aide { font-size: .82rem; color: var(--encre-tres-doux); text-transform: none; letter-spacing: 0; }
.champ input, .champ select, .champ textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--encre);
  background: var(--craie);
  border: 2px solid var(--trait); border-radius: 0;
  padding: .7rem .85rem;
}
.champ textarea { resize: vertical; min-height: 8rem; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: 3px solid var(--rose); outline-offset: 2px; }
.champ--duo { display: grid; gap: 1.25rem; }
@media (min-width: 40rem) { .champ--duo { grid-template-columns: 1fr 1fr; } }

.consentement { display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; color: var(--encre-doux); }
.consentement input { width: 1.1rem; height: 1.1rem; margin-top: .25rem; flex: none; }

/* Piège à robots : invisible à l'écran, atteignable par les seuls automates.
   Ne jamais utiliser display:none, que certains robots détectent. */
.pot-de-miel { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.message-ok, .message-erreur {
  border: 2px solid var(--trait); padding: 1.1rem 1.35rem; margin-bottom: 2rem;
}
.message-ok { background: var(--sauge-pale); }
.message-erreur { background: var(--rose-pale); }
.message-ok strong, .message-erreur strong { display: block; margin-bottom: .3rem; }
.message-erreur ul { margin: .5rem 0 0 1.1rem; }

/* --- 14. Contact et pied de page --------------------------------------- */

.fiche { border: 2px solid var(--trait); background: var(--craie); padding: clamp(1.25rem, 3vw, 2rem); }
.fiche dt { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--encre-tres-doux); margin-top: 1.1rem; }
.fiche dt:first-child { margin-top: 0; }
.fiche dd { font-size: 1.05rem; }
.fiche dd a { color: var(--encre); }

.site-pied { background: var(--encre); color: var(--papier-fonce); padding-block: clamp(2.5rem, 5vw, 4rem); font-size: .92rem; }
.site-pied a { color: var(--rose-clair); text-decoration: none; }
.site-pied a:hover { text-decoration: underline; }
.site-pied h2 { font-size: 1rem; font-family: var(--texte); letter-spacing: .14em; text-transform: uppercase; color: var(--encre-tres-doux); margin-bottom: .9rem; }
.site-pied__grille { display: grid; gap: 2.5rem; }
@media (min-width: 48rem) { .site-pied__grille { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-pied ul { list-style: none; }
.site-pied li + li { margin-top: .45rem; }
.site-pied__legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(242,237,227,.18); font-size: .82rem; color: var(--encre-tres-doux); }

/* --- 15. Fil d'Ariane --------------------------------------------------- */

.fil { font-size: .84rem; color: var(--encre-tres-doux); padding-block: 1rem; }
.fil ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; }
.fil li + li::before { content: "/"; margin-right: .4rem; color: var(--trait-fin); }
.fil a { color: var(--encre-doux); }

/* --- 16. Divers --------------------------------------------------------- */

/* Encadré de travail, visible uniquement pendant la rédaction du site.
   Ne doit jamais rester sur une page mise en ligne. */
.a-remplir {
  border: 2px dashed var(--rose);
  background: repeating-linear-gradient(45deg, transparent, transparent 8px, var(--rose-pale) 8px, var(--rose-pale) 16px);
  padding: 1rem 1.25rem; font-size: .92rem;
}
.a-remplir strong { color: var(--rose-sombre); }

/* Avertissement destiné au lecteur, celui-là reste en ligne.
   Sobre et lisible, pas rayé : ce n'est pas une note de chantier. */
.avertissement {
  border: 1px solid var(--trait);
  border-left: 5px solid var(--sauge);
  background: var(--craie);
  padding: 1.1rem 1.35rem;
  margin-bottom: 2.5rem;
  max-width: 62ch;
  font-size: .95rem;
}
.avertissement strong { display: block; margin-bottom: .3rem; }
.avertissement p { color: var(--encre-doux); }

.saut-au-contenu {
  position: absolute; left: -9999px;
  background: var(--encre); color: var(--craie); padding: .8rem 1.2rem; z-index: 100;
}
.saut-au-contenu:focus { left: 1rem; top: 1rem; position: fixed; }

.invisible {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- 17. Accessibilité et impression ------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cas, .cas:nth-of-type(even) { transform: none !important; }
  .photo, .note { transform: none !important; }
}

@media print {
  body::before, .site-entete, .nav, .boutons { display: none; }
  body { background: #fff; color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: .8em; }
}
