/* Martinien Tech : le marine du costume pour l'encre, le vert du logo seulement pour agir. */
:root {
  --papier: #f1f3f0;
  --blanc: #ffffff;
  --encre: #0f1c2e;
  --encre-2: #4a5868;
  --encre-3: #7b8794;
  --ligne: rgba(15, 28, 46, 0.14);
  --signal: #13a454;
  --signal-fonce: #0b7a3d;
  --whatsapp: #1fbf5c;
  --conteneur: 1240px;
  --marge: clamp(16px, 4vw, 48px);
  --police: "Archivo", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--papier);
  color: var(--encre);
  font-family: var(--police);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { width: 1em; height: 1em; flex-shrink: 0; }
ul, ol { list-style: none; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--encre); color: var(--blanc); }

.conteneur { width: 100%; max-width: calc(var(--conteneur) + 2 * var(--marge)); margin-inline: auto; padding-inline: var(--marge); }
.aller-contenu { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--encre); color: var(--blanc); padding: 10px 16px; border-radius: 8px; }
.aller-contenu:focus { left: 8px; }

/* Titres : Archivo élargi, le caractère de la marque */
h1, h2, h3 { font-weight: 800; font-stretch: 112%; letter-spacing: -0.015em; line-height: 1.05; }
.titre-section { font-size: clamp(2rem, 4.4vw, 3.4rem); max-width: 18ch; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 48px; padding: 0.8em 1.4em; border-radius: 10px;
  font-weight: 700; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s, transform 0.2s;
}
.btn svg { width: 1.25em; height: 1.25em; }
.btn:active { transform: translateY(1px); }
.btn-whatsapp { background: var(--whatsapp); color: #04230f; }
.btn-whatsapp:hover { background: #19a84f; }
.btn-contour { border: 1.5px solid var(--encre); }
.btn-contour:hover { background: var(--encre); color: var(--blanc); }
.btn-petit { min-height: 40px; padding: 0.5em 1em; font-size: 0.92rem; }
.btn-grand { font-size: 1.2rem; min-height: 60px; padding: 0.8em 1.6em; }
.lien-souligne { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.lien-souligne:hover { text-decoration-color: var(--signal); }

/* Navigation */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 72px;
  display: flex; align-items: center; gap: 28px; padding-inline: var(--marge);
  transition: background-color 0.3s, box-shadow 0.3s;
}
.nav.defile { background: rgba(241, 243, 240, 0.94); box-shadow: 0 1px 0 var(--ligne); backdrop-filter: blur(12px); }
.nav-logo img { border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); }
.nav-liens { display: flex; gap: 26px; margin-left: auto; }
.nav-liens a { text-decoration: none; font-weight: 600; font-size: 0.95rem; padding-block: 6px; border-bottom: 2px solid transparent; }
.nav-liens a:hover, .nav-liens a.actif { border-bottom-color: var(--encre); }
.nav-burger { display: none; width: 44px; height: 44px; border-radius: 50%; background: var(--blanc); position: relative; margin-left: auto; box-shadow: 0 2px 10px rgba(15, 28, 46, 0.15); }
.nav-burger span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--encre); transition: transform 0.3s; }
.nav-burger span:first-child { top: 17px; } .nav-burger span:last-child { top: 25px; }
.nav-burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Accueil ---------- */
.hero {
  --deborde: clamp(72px, 11vw, 190px); /* ce que le nom mord sur la photo */
  min-height: 100svh; display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
}
.hero-photo { position: relative; background: #000; overflow: hidden; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.hero-contenu {
  position: relative; z-index: 2; align-self: center;
  padding: 120px var(--marge) 72px clamp(28px, 4vw, 64px);
  max-width: 760px;
}
/* Le nom est écrit deux fois au même endroit : en blanc côté photo, en marine côté papier.
   Le titre recule de --deborde sur la photo ; la frontière tombe donc à --deborde de son bord gauche. */
.hero-nom {
  display: grid; margin-left: calc(-1 * var(--deborde) - clamp(28px, 4vw, 64px));
  font-size: clamp(3.4rem, 8.6vw, 9.6rem); font-stretch: 125%; font-weight: 850; line-height: 0.86; letter-spacing: -0.03em;
}
.hero-nom > span { grid-area: 1 / 1; }
.nom-blanc { color: var(--blanc); clip-path: inset(0 calc(100% - var(--deborde)) 0 0); }
.nom-encre { color: var(--encre); clip-path: inset(0 0 0 var(--deborde)); }
.hero-intro { margin-top: clamp(24px, 3vw, 40px); font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; max-width: 34ch; color: var(--encre); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 30px; }

/* Un seul moment animé : l'ouverture du site */
@media (prefers-reduced-motion: no-preference) {
  .hero-photo img { animation: photoMonte 1.3s cubic-bezier(.2, .8, .2, 1) both; }
  .hero-nom { animation: nomGlisse 1.1s cubic-bezier(.2, .8, .2, 1) 0.25s both; }
  .hero-intro, .hero-actions, }
@keyframes photoMonte { from { clip-path: inset(100% 0 0 0); transform: scale(1.06); } to { clip-path: inset(0 0 0 0); transform: none; } }
@keyframes nomGlisse { from { opacity: 0; transform: translateY(30px); } }
@keyframes apparait { from { opacity: 0; } }

/* ---------- Services : grandes images qui bougent doucement sur place ---------- */
.services { max-width: calc(var(--conteneur) + 2 * var(--marge)); margin: 0 auto; padding: clamp(80px, 11vw, 150px) var(--marge); }
.services-tete { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 48px; align-items: end; margin-bottom: clamp(36px, 5vw, 60px); }
.services-tete h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); max-width: 14ch; }
.services-tete p { color: var(--encre-2); max-width: 40ch; margin-bottom: 14px; }
.services-tete .lien-souligne { grid-column: 2; justify-self: start; }
.services-liste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 64px) clamp(20px, 3vw, 40px); }
.service-visuel { overflow: hidden; border-radius: 14px; aspect-ratio: 4 / 3; background: var(--encre); }
.service-visuel img { width: 100%; height: 100%; object-fit: cover; }
.service:last-child { grid-column: 1 / -1; }
.service:last-child .service-visuel { aspect-ratio: 21 / 9; }
.service h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); margin-top: 22px; }
.service p { margin-top: 10px; color: var(--encre-2); max-width: 52ch; }
@media (prefers-reduced-motion: no-preference) {
  .service-visuel img { animation: surPlace 18s ease-in-out infinite alternate; }
  .service:nth-child(2) .service-visuel img { animation-delay: -6s; animation-direction: alternate-reverse; }
  .service:nth-child(3) .service-visuel img { animation-delay: -11s; }
  .service:nth-child(4) .service-visuel img { animation-delay: -3s; animation-direction: alternate-reverse; }
}
@keyframes surPlace { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.16) translate(-3%, -2%); } }

/* ---------- Réalisations ---------- */
#realisations > .titre-section { padding-bottom: clamp(32px, 4vw, 48px); max-width: none; }
#realisations > .titre-section { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.projet { --fond: #ecebfd; --accent: #4b3bd6; --texte: var(--encre); --texte-2: var(--encre-2);
  background: var(--fond); color: var(--texte); padding-block: clamp(64px, 9vw, 120px); overflow: hidden; }
.projet-moddess { --fond: #0a2b8c; --accent: #8db8ff; --texte: #ffffff; --texte-2: #c9d8ff; }
.projet-psb { --fond: #fff2d2; --accent: #a86b00; }
.projet-grille { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.projet-inverse .projet-texte { order: 2; }
.projet-genre { color: var(--accent); font-weight: 700; font-size: 0.98rem; }
.projet h3 { font-size: clamp(2.3rem, 4.6vw, 4rem); font-stretch: 125%; margin: 10px 0 18px; display: flex; align-items: center; gap: 0.25em; }
.projet-icone { width: 0.85em; height: 0.85em; border-radius: 22%; }
.projet-resume { font-size: 1.15rem; max-width: 40ch; }
.projet-faits { margin: 24px 0; display: grid; gap: 8px; color: var(--texte-2); }
.projet-faits li { padding-left: 22px; position: relative; }
.projet-faits li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 10px; height: 2px; background: var(--accent); }
.projet-outils { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 30px; font-size: 0.92rem; font-weight: 600; }
.projet-outils li { display: inline-flex; align-items: center; gap: 7px; }
.projet-outils img { width: 18px; height: 18px; }
.projet-moddess .projet-outils img { filter: brightness(0) invert(1); }
.projet-liens { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.btn-projet { background: var(--encre); color: var(--blanc); }
.btn-projet:hover { background: #22324a; }
.projet-moddess .btn-projet { background: var(--blanc); color: #0a2b8c; }
.projet-moddess .btn-projet:hover { background: #dfe8ff; }
.projet-media { position: relative; }

.navigateur { border-radius: 12px; overflow: hidden; background: var(--blanc); box-shadow: 0 30px 70px -30px rgba(40, 30, 120, 0.45); }
.navigateur-barre { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #f3f3f6; border-bottom: 1px solid var(--ligne); }
.navigateur-barre i { width: 10px; height: 10px; border-radius: 50%; background: #d4d4dc; }
.navigateur-barre span { margin-left: 12px; font-size: 0.78rem; color: var(--encre-2); }
.diaporama { position: relative; aspect-ratio: 16 / 10; }
.diaporama img, .galerie img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity 0.8s ease; }
.diaporama img.actif, .galerie img.actif { opacity: 1; }
.telephone { position: absolute; width: 27%; right: -3%; bottom: -10%; aspect-ratio: 9 / 19.5; border-radius: 28px; padding: 6px; background: var(--encre); box-shadow: 0 24px 50px -20px rgba(15, 28, 46, 0.6); }
.telephone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 22px; }
.galerie { position: relative; width: min(100%, 400px); margin-inline: auto; aspect-ratio: 855 / 1840; max-height: 620px; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.6); }
.galerie img { object-fit: contain; }
.points-diapo { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.points-diapo button { width: 28px; height: 28px; display: grid; place-items: center; }
.points-diapo button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); transition: background-color 0.3s, transform 0.3s; }
.points-diapo button.actif::before { background: var(--blanc); transform: scale(1.3); }
.eventail { position: relative; height: clamp(380px, 46vw, 540px); }
.eventail img { position: absolute; top: 50%; left: 50%; width: 42%; aspect-ratio: 9 / 16; object-fit: cover; object-position: top; border-radius: 18px; box-shadow: 0 30px 60px -24px rgba(80, 50, 0, 0.5); transition: transform 0.9s cubic-bezier(.2, .8, .2, 1), opacity 0.9s; cursor: pointer; }

/* ---------- Vidéos ---------- */
.videos-section { background: var(--encre); color: var(--blanc); padding-block: clamp(80px, 11vw, 140px); }
.videos-tete { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
.videos-tete p { color: #b9c4d2; max-width: 40ch; }
.videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2.4vw, 32px); }
.video-cadre { position: relative; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: #000; cursor: pointer; }
.video-cadre video { width: 100%; height: 100%; object-fit: cover; }
.video-son { position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.92); color: var(--encre); font-size: 19px; }
.video figcaption { margin-top: 14px; font-weight: 600; color: #b9c4d2; }

/* ---------- Outils ---------- */
.outils-section { padding-block: clamp(80px, 11vw, 140px); }
.metiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: clamp(32px, 4vw, 48px); border-top: 1.5px solid var(--encre); }
.metier { padding: 30px 32px 34px 0; border-bottom: 1px solid var(--ligne); }
.metier:nth-child(even) { padding-left: 32px; border-left: 1px solid var(--ligne); }
.metier h3 { font-size: 1.4rem; }
.metier p { margin-top: 8px; color: var(--encre-2); max-width: 44ch; }
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 18px; margin-top: 22px; }
.logos li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.logos img { width: 26px; height: 26px; }
.logos .sans-logo { padding-left: 36px; }

/* ---------- Méthode : une vraie suite, donc numérotée ---------- */
.methode { padding-bottom: clamp(80px, 11vw, 140px); }
.etapes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; margin-top: clamp(32px, 4vw, 48px); counter-reset: etape; }
.etapes li { counter-increment: etape; padding-top: 18px; border-top: 1.5px solid var(--encre); }
.etapes li::before { content: counter(etape); display: block; font-weight: 850; font-stretch: 125%; font-size: 2.6rem; line-height: 1; color: var(--signal-fonce); margin-bottom: 14px; }
.etapes h3 { font-size: 1.15rem; }
.etapes p { margin-top: 6px; color: var(--encre-2); font-size: 0.97rem; }

/* ---------- Tarifs ---------- */
.tarifs { padding-bottom: clamp(80px, 11vw, 140px); }
.tarifs-tete { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.tarifs-tete p { color: var(--encre-2); max-width: 46ch; }
.onglets { display: flex; gap: 28px; margin: 40px 0 28px; border-bottom: 1px solid var(--ligne); overflow-x: auto; scrollbar-width: none; }
.onglets button { padding: 12px 0; font-weight: 700; color: var(--encre-2); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.onglets button[aria-selected="true"] { color: var(--encre); border-bottom-color: var(--signal); }
.panneau[hidden] { display: none; }
.offres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1.5px solid var(--encre); border-radius: 14px; overflow: hidden; background: var(--blanc); }
.offre { padding: 30px 28px 32px; position: relative; }
.offre + .offre { border-left: 1px solid var(--ligne); }
.offre h3 { font-size: 1.35rem; }
.offre-pour { color: var(--encre-2); margin-top: 4px; font-size: 0.97rem; }
.prix { font-weight: 850; font-stretch: 118%; font-size: clamp(2rem, 3.2vw, 2.6rem); line-height: 1.05; margin: 22px 0; }
.prix small { display: block; font-weight: 500; font-stretch: 100%; font-size: 0.85rem; color: var(--encre-2); }
.offre ul { display: grid; gap: 8px; }
.offre li { padding-left: 20px; position: relative; }
.offre li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 10px; height: 2px; background: currentColor; opacity: 0.6; }
.offre-vedette { background: var(--encre); color: var(--blanc); }
.offre-vedette .offre-pour, .offre-vedette .prix small { color: #b9c4d2; }
.offre-badge { display: inline-block; margin-bottom: 12px; padding: 3px 10px; border-radius: 6px; background: var(--whatsapp); color: #04230f; font-size: 0.82rem; font-weight: 700; }
.grille-prix { width: 100%; border-collapse: collapse; margin-top: 36px; }
.grille-prix caption { text-align: left; font-weight: 800; font-stretch: 112%; font-size: 1.2rem; padding-bottom: 12px; }
.grille-prix th, .grille-prix td { padding: 14px 0; border-bottom: 1px solid var(--ligne); text-align: left; font-weight: 500; }
.grille-prix tr:first-child th, .grille-prix tr:first-child td { border-top: 1.5px solid var(--encre); }
.grille-prix td { text-align: right; font-weight: 800; white-space: nowrap; padding-left: 16px; }
.note-legale { margin-top: 24px; color: var(--encre-2); }
.conditions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 40px; color: var(--encre-2); font-size: 0.97rem; }
.conditions b { color: var(--encre); }

/* ---------- Contact ---------- */
.contact { background: var(--encre); color: var(--blanc); padding-block: clamp(80px, 11vw, 140px); }
.contact-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.contact h2 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-stretch: 125%; max-width: 11ch; }
.contact-texte p { margin: 22px 0 32px; color: #b9c4d2; max-width: 38ch; font-size: 1.1rem; }
.contact-mail { display: block; width: fit-content; margin-top: 22px; color: #b9c4d2; word-break: break-all; }
.contact-mail:hover { color: var(--blanc); }
.devis { background: var(--blanc); color: var(--encre); border-radius: 14px; padding: clamp(22px, 3vw, 34px); display: grid; gap: 18px; }
.devis label { display: grid; gap: 7px; font-weight: 600; font-size: 0.95rem; }
.devis input, .devis select, .devis textarea {
  font: inherit; font-weight: 400; color: var(--encre); background: var(--papier); border: 1.5px solid transparent; border-radius: 8px; padding: 12px 14px; resize: vertical; min-height: 48px;
}
.devis input:focus, .devis select:focus, .devis textarea:focus { outline: none; border-color: var(--encre); background: var(--blanc); }
.devis-note { font-size: 0.86rem; color: var(--encre-2); }

.pied { display: flex; align-items: center; gap: 14px; padding-block: 32px 110px; color: var(--encre-2); font-size: 0.95rem; }
.pied img { border-radius: 50%; }
.pied-petit { margin-left: auto; }

/* ---------- Assistant ---------- */
.chat-bulle {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; align-items: center; gap: 10px;
  padding: 5px 18px 5px 5px; border-radius: 999px; background: var(--encre); color: var(--blanc);
  box-shadow: 0 12px 30px -8px rgba(15, 28, 46, 0.5); transition: transform 0.25s, opacity 0.25s;
}
.chat-bulle img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 42% center; }
.chat-bulle-texte { font-weight: 700; font-size: 0.95rem; }
.chat-bulle.cache { transform: scale(0.6); opacity: 0; pointer-events: none; }
.chat {
  position: fixed; right: 20px; bottom: 20px; z-index: 70; width: min(400px, calc(100vw - 24px)); height: min(620px, calc(100svh - 40px));
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--blanc);
  box-shadow: 0 40px 90px -20px rgba(15, 28, 46, 0.45); transform-origin: bottom right;
}
.chat[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .chat.ouvre { animation: ouvreChat 0.3s cubic-bezier(.2, .9, .3, 1.15); } }
@keyframes ouvreChat { from { opacity: 0; transform: scale(0.9) translateY(16px); } }
.chat-tete { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--encre); color: var(--blanc); }
.chat-tete img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: 42% center; }
.chat-tete b { display: block; font-size: 0.98rem; }
.chat-tete small { display: block; color: #b9c4d2; font-size: 0.8rem; }
.chat-fermer { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; font-size: 1.7rem; line-height: 1; }
.chat-fermer:hover { background: rgba(255, 255, 255, 0.12); }
.chat-fil { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; background: var(--papier); }
.bulle { max-width: 86%; padding: 11px 14px; border-radius: 14px; font-size: 0.97rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.bulle-ia { align-self: flex-start; background: var(--blanc); border-bottom-left-radius: 4px; }
.bulle-moi { align-self: flex-end; background: var(--encre); color: var(--blanc); border-bottom-right-radius: 4px; }
.bulle-ia a { color: var(--signal-fonce); font-weight: 700; }
.ecrit { display: inline-flex; gap: 4px; padding: 4px 2px; }
.ecrit i { width: 7px; height: 7px; border-radius: 50%; background: var(--encre-3); animation: saute 1.2s infinite; }
.ecrit i:nth-child(2) { animation-delay: 0.15s; } .ecrit i:nth-child(3) { animation-delay: 0.3s; }
@keyframes saute { 30% { transform: translateY(-4px); opacity: 1; } 0%, 60%, 100% { opacity: 0.4; } }
.chat-suggestions { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; background: var(--papier); scrollbar-width: none; }
.chat-suggestions[hidden] { display: none; }
.chat-suggestions button { flex-shrink: 0; font-size: 0.86rem; padding: 8px 12px; border-radius: 8px; border: 1.5px solid var(--encre); background: var(--blanc); font-weight: 600; }
.chat-suggestions button:hover { background: var(--encre); color: var(--blanc); }
.chat-saisie { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--ligne); align-items: flex-end; }
.chat-saisie textarea { flex: 1; font: inherit; font-size: 1rem; color: var(--encre); background: var(--papier); border: 1.5px solid transparent; border-radius: 10px; padding: 11px 14px; resize: none; max-height: 120px; }
.chat-saisie textarea:focus { outline: none; border-color: var(--encre); background: var(--blanc); }
.chat-saisie button { width: 46px; height: 46px; flex-shrink: 0; border-radius: 10px; background: var(--encre); color: var(--blanc); display: grid; place-items: center; font-size: 20px; }
.chat-saisie button:disabled { opacity: 0.4; cursor: default; }

/* ---------- Tailles d'écran ----------
   >= 1600 grand écran | <= 1080 tablette et petit portable | <= 820 tablette en portrait
   <= 600 téléphone | <= 360 petit téléphone */
@media (min-width: 1600px) {
  :root { --conteneur: 1400px; }
  body { font-size: 1.125rem; }
}
@media (max-width: 1080px) {
  .nav-liens { position: fixed; top: 76px; left: 12px; right: 12px; flex-direction: column; gap: 0; padding: 8px; border-radius: 14px; background: var(--blanc); box-shadow: 0 30px 60px -20px rgba(15, 28, 46, 0.4); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity 0.2s, transform 0.2s; }
  .nav-liens.ouvert { opacity: 1; pointer-events: auto; transform: none; }
  .nav-liens a { padding: 14px 16px; font-size: 1.05rem; border: 0; border-radius: 8px; }
  .nav-liens a:hover, .nav-liens a.actif { background: var(--papier); }
  .nav-burger { display: block; margin-left: 0; }
  .nav-cta { margin-left: auto; }
  .etapes { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 36px; }
}
@media (max-width: 820px) {
  /* La photo passe en haut, pleine largeur ; le nom se pose sur son bas. */
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-photo { aspect-ratio: 1; max-height: 78svh; width: 100%; }
  .hero-photo::after { content: ""; position: absolute; inset: 55% 0 0 0; background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.85)); }
  .hero-contenu { padding: 0 var(--marge) 64px; max-width: none; }
  .hero-nom { margin: calc(-1 * (0.86em * 2 + 18px)) 0 0; position: relative; z-index: 3; font-size: clamp(3rem, 15vw, 6.4rem); }
  .nom-blanc { clip-path: none; }
  .nom-encre { visibility: hidden; }
  .hero-intro { margin-top: 30px; max-width: 40ch; }
  .services-tete { grid-template-columns: minmax(0, 1fr); }
  .services-tete .lien-souligne { grid-column: 1; }
  .projet-grille, .projet-inverse { grid-template-columns: 1fr; }
  .projet-inverse .projet-texte { order: 0; }
  .projet-media { margin-top: 12px; }
  .telephone { width: 30%; right: 0; bottom: -8%; }
  .videos-tete, .tarifs-tete, .contact-grille { grid-template-columns: 1fr; }
  .videos { grid-template-columns: repeat(3, minmax(220px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--marge)); padding-inline: var(--marge); padding-bottom: 8px; scrollbar-width: none; }
  .video { scroll-snap-align: start; }
  .metiers { grid-template-columns: 1fr; }
  .metier, .metier:nth-child(even) { padding: 26px 0 30px; border-left: 0; }
  .offres { grid-template-columns: 1fr; }
  .offre + .offre { border-left: 0; border-top: 1px solid var(--ligne); }
  .conditions { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 600px) {
  .nav { height: 64px; gap: 10px; }
  .nav-cta { display: none; }
  .nav-burger { margin-left: auto; }
  .nav-liens { top: 68px; }
  .hero-photo { aspect-ratio: 4 / 5; }
        .hero-actions .btn { width: 100%; white-space: normal; text-align: center; }
  .services-tete .btn { white-space: normal; text-align: center; }
  .services-liste { grid-template-columns: minmax(0, 1fr); }
  .service:last-child .service-visuel { aspect-ratio: 4 / 3; }
  .eventail img { width: 56%; }
  .onglets { gap: 18px; }
  .onglets button { font-size: 0.95rem; }
  .videos { grid-template-columns: repeat(3, 70%); }
  .etapes { grid-template-columns: 1fr; row-gap: 24px; }
  .grille-prix th, .grille-prix td { display: block; text-align: left; padding: 0; border: 0; }
  .grille-prix tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--ligne); }
  .grille-prix tr:first-child { border-top: 1.5px solid var(--encre); }
  .grille-prix tr:first-child th, .grille-prix tr:first-child td { border-top: 0; }
  .grille-prix td { margin-top: 2px; color: var(--signal-fonce); }
  .chat { right: 0; bottom: 0; width: 100vw; height: 100svh; border-radius: 0; }
  .chat-bulle { right: 14px; bottom: 14px; padding: 4px; }
  .chat-bulle-texte { display: none; }
  .pied { flex-wrap: wrap; }
  .pied-petit { margin-left: 0; width: 100%; }
}
@media (max-width: 360px) {
  .onglets { gap: 14px; }
  .onglets button { font-size: 0.86rem; }
}
@media (max-height: 500px) and (orientation: landscape) and (max-width: 1080px) {
  .hero-photo { max-height: 90svh; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ---------- Messagerie avec Martinien ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn-encre { background: var(--encre); color: var(--blanc); }
.btn-encre:hover { background: #22324a; }
.btn:disabled { opacity: 0.55; cursor: progress; }
.devis-boutons { display: flex; flex-wrap: wrap; gap: 10px; }
.devis-boutons .btn { flex: 1 1 200px; }
.devis-etat { font-weight: 600; min-height: 1.2em; }
.devis-etat.erreur { color: #b42318; }
.devis-etat.ok { color: var(--signal-fonce); }

.chat-humain { margin-left: auto; padding: 7px 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.12); font-weight: 700; font-size: 0.84rem; white-space: nowrap; }
.chat-humain:hover { background: rgba(255, 255, 255, 0.22); }
.chat-humain[hidden] { display: none; }
.chat-humain + .chat-fermer, .chat-humain[hidden] + .chat-fermer { margin-left: 4px; }
.chat-humain[hidden] + .chat-fermer { margin-left: auto; }
.chat-tete > div { min-width: 0; }
.chat-tete small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-transfert { padding: 14px 16px; background: var(--blanc); border-top: 1px solid var(--ligne); display: grid; gap: 10px; }
.chat-transfert[hidden] { display: none; }
.chat-transfert p { font-size: 0.92rem; color: var(--encre-2); }
.chat-transfert label { display: grid; gap: 5px; font-weight: 600; font-size: 0.88rem; }
.chat-transfert input { font: inherit; padding: 10px 12px; border-radius: 8px; border: 1.5px solid var(--ligne); }
.chat-transfert input:focus { outline: none; border-color: var(--encre); }
.chat-transfert-boutons { display: flex; gap: 8px; }
.bulle-admin { align-self: flex-start; background: #e6f6ec; border-bottom-left-radius: 4px; }
.bulle-admin .bulle-auteur { display: block; font-size: 0.78rem; font-weight: 700; color: var(--signal-fonce); margin-bottom: 2px; }
.bulle-systeme { align-self: center; max-width: 92%; background: transparent; color: var(--encre-2); font-size: 0.85rem; text-align: center; padding: 4px 8px; }
.proposition { align-self: flex-start; display: flex; flex-wrap: wrap; gap: 8px; }
.proposition .btn { min-height: 40px; }
.chat-bulle .pastille { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; border-radius: 11px; padding: 0 6px; background: #e5484d; color: #fff; font-size: 0.78rem; font-weight: 800; display: grid; place-items: center; }
.chat-bulle .pastille[hidden] { display: none; }
