/* Opus Sites — variables, remise à zéro, typographie, en-tête, boutons, pied de page. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --fond: #ffffff;
  --gris: #f5f5f4;
  --noir: #141414;
  --texte: #141414;
  --doux: #6e6e73;
  --titre-gris: #6e6e73;
  --accent: #176b53;
  --trait: rgb(0 0 0 / .08);
  --police: 'Inter', system-ui, -apple-system, sans-serif;
  --sortie: cubic-bezier(.2, .8, .2, 1);
  --deplacement: cubic-bezier(.77, 0, .175, 1); /* mouvement d'un point à un autre, à l'écran */
  --largeur: 1120px;
  --entete: 56px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--entete) + 16px); }
body { background: var(--fond); color: var(--texte); font-family: var(--police); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(*) { animation-duration: .25s; }
}

.evitement { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--noir); color: #fff; padding: 10px 16px; border-radius: 8px; }
.evitement:focus { top: 12px; }

.conteneur { max-width: var(--largeur); margin: 0 auto; padding: 0 20px; }
.surtitre { font-size: 15px; font-weight: 600; color: var(--accent); margin-bottom: 14px; }
.titre-section { font-size: clamp(34px, 5vw, 60px); font-weight: 700; line-height: 1.05; letter-spacing: -.04em; }
.titre-section span { display: block; color: var(--titre-gris); }
.chapeau { margin-top: 18px; max-width: 620px; font-size: clamp(17px, 1.5vw, 20px); color: var(--doux); }

/* ---------- En-tête ---------- */
.entete { position: sticky; top: 0; z-index: 10; background: rgb(255 255 255 / .82); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgb(0 0 0 / .06); }
.entete__in { max-width: var(--largeur); margin: 0 auto; padding: 0 20px; height: var(--entete); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
/* Logo (piste B) : « opus » noir, « sites » gris, point du i en vert */
.logo { font-weight: 700; font-size: 22px; letter-spacing: -.045em; line-height: 1; display: inline-flex; gap: .22em; }
.logo__sites { color: #6e6e73; font-weight: 600; }
.logo__i { position: relative; }
.logo__i::after { content: ''; position: absolute; left: 50%; top: .13em; width: .19em; height: .19em; margin-left: -.095em; border-radius: 50%; background: var(--accent); }
.nav { display: flex; gap: 28px; font-size: 14px; color: #3a3a3c; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--texte); }
.nav a[aria-current="page"] { font-weight: 600; }

/* ---------- Boutons et liens ---------- */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--noir); color: #fff; font-weight: 500; border: 0; border-radius: 999px; padding: 12px 22px; font-size: 16px; cursor: pointer; transition: background .2s, transform .2s var(--sortie); }
.bouton:hover { background: #000; }
.bouton:active { transform: scale(.97); }
.bouton--petit { padding: 8px 16px; font-size: 14px; }
.bouton--clair { background: #fff; color: var(--noir); }
.bouton--clair:hover { background: #ececec; }
.bouton--contour { background: transparent; color: var(--noir); box-shadow: inset 0 0 0 1.5px var(--noir); }
.bouton--contour:hover { background: var(--noir); color: #fff; }
.lien { color: var(--accent); font-size: 17px; font-weight: 500; }
.lien:hover { text-decoration: underline; }

/* ---------- Pied de page ---------- */
.pied { background: var(--gris); border-top: 1px solid var(--trait); padding: 56px 0 32px; font-size: 14px; color: var(--doux); }
.pied__grille { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.pied__texte { margin-top: 14px; max-width: 300px; }
.pied h2 { font-size: 13px; font-weight: 600; color: var(--texte); margin-bottom: 12px; }
.pied li + li { margin-top: 8px; }
.pied a:hover { color: var(--texte); }
.pied__bas { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--trait); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

@media (max-width: 760px) {
  .nav { display: none; }
  .pied__grille { grid-template-columns: 1fr 1fr; }
  .pied__marque { grid-column: 1 / -1; }
}

/* ---------- Assistant (bulle en bas à droite, assets/js/assistant.js) ---------- */
.assistant { position: fixed; z-index: 20; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); width: min(400px, calc(100% - 32px)); display: grid; justify-items: end; gap: 12px; pointer-events: none; }
.assistant > * { pointer-events: auto; }
.assistant__bulle { position: relative; display: grid; place-items: center; width: 68px; height: 68px; padding: 4px; border: 0; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 10px 28px rgb(0 0 0 / .22); transition: transform .2s var(--sortie); }
.assistant__bulle:hover { transform: scale(1.05); }
.assistant__bulle:active { transform: scale(.95); }
.assistant__logo { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
/* Point vert « en ligne », comme un statut de messagerie. */
.assistant__bulle::after, .assistant__avatar::after { content: ''; position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px #fff; }
.assistant__panneau { width: 100%; height: min(640px, calc(100dvh - 32px)); display: grid; grid-template-rows: auto 1fr auto; background: var(--gris); border-radius: 24px; overflow: hidden; box-shadow: 0 0 0 1px var(--trait), 0 24px 60px rgb(0 0 0 / .18); overflow-wrap: anywhere; }
.assistant__panneau[hidden] { display: none; }
.assistant__entete { display: flex; align-items: center; gap: 12px; padding: 16px 12px 16px 18px; background: var(--accent); color: #fff; }
.assistant__avatar { position: relative; flex: none; width: 48px; height: 48px; padding: 2px; border-radius: 50%; background: #fff; }
.assistant__avatar::after { top: 0; right: 0; width: 12px; height: 12px; box-shadow: 0 0 0 2px var(--accent); }
.assistant__avatar .assistant__logo { box-shadow: none; }
.assistant__identite { flex: 1; min-width: 0; }
.assistant__entete h2 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.assistant__statut { display: flex; align-items: center; gap: 6px; font-size: 14px; color: rgb(255 255 255 / .85); }
.assistant__statut::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #34d399; }
.assistant__fermer { width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.assistant__fermer:hover { background: rgb(255 255 255 / .15); }
.assistant__fil { overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 14px; padding: 20px 18px; }
.assistant__accueil { margin-top: auto; display: grid; gap: 6px; color: var(--doux); font-size: 15px; }
.assistant__bonjour { font-size: 26px; font-weight: 700; letter-spacing: -.03em; color: var(--texte); }
.assistant__questions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.assistant__choix { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .14); color: var(--texte); font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; }
.assistant__choix:hover { box-shadow: inset 0 0 0 1.5px var(--noir); }
.assistant__devis { display: inline-flex; align-items: center; background: var(--accent); box-shadow: none; color: #fff; }
.assistant__devis:hover { background: #0f5a45; box-shadow: none; }
.assistant__choix:disabled, .assistant__envoyer:disabled { opacity: .5; cursor: progress; }
.assistant__conversation { display: flex; flex-direction: column; gap: 8px; }
.assistant__conversation:empty { display: none; }
.assistant__message { max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; white-space: pre-line; }
.assistant__message--assistant { align-self: flex-start; background: #fff; border-bottom-left-radius: 6px; }
.assistant__message--visiteur { align-self: flex-end; background: var(--noir); color: #fff; border-bottom-right-radius: 6px; }
.assistant__message--attente { color: var(--doux); font-style: italic; }
.assistant__pied { display: grid; gap: 8px; padding: 12px 14px 12px; border-top: 1px solid var(--trait); background: var(--gris); }
.assistant__formulaire { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 18px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px rgb(23 107 83 / .12); }
.assistant__formulaire input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: none; font-size: 16px; }
.assistant__formulaire input:focus { outline: none; }
.assistant__formulaire:focus-within { box-shadow: inset 0 0 0 2.5px var(--accent), 0 0 0 5px rgb(23 107 83 / .35); }
.assistant__envoyer { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; }
.assistant__envoyer:hover { background: #0f5a45; }
.assistant__note { font-size: 13px; color: var(--doux); line-height: 1.4; text-align: center; }
.assistant__note a { text-decoration: underline; }
.assistant__cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Écran peu haut (téléphone à l'horizontale) : en-tête et accueil compacts, la conversation garde la place. */
@media (max-height: 500px) {
  .assistant__entete { padding-block: 8px; }
  .assistant__avatar { width: 36px; height: 36px; }
  .assistant__statut { display: none; }
  .assistant__fil { padding-block: 12px; }
  .assistant__bonjour { font-size: 20px; }
  .assistant__note { font-size: 12px; }
}
.assistant__bulle[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .assistant__bulle { transition: none; } }
