/* Devis Diali — vitrine. Charte : D:\xampp17\_khettara\devisdiali\charte.md (graphite + orange signal sur calque). */
:root {
  --orange: #E85D1A;   /* orange bigarade, l'oranger des allées de Marrakech */
  --brique: #B8440C;   /* orange brûlé : texte orange sur fond clair */
  --fer: #24201C;      /* fer forgé */
  --pierre: #5E5750;   /* texte secondaire */
  --cedre: #7A5638;    /* cèdre de l'Atlas : tracés de sebka */
  --chaux: #F6F2EA;    /* mur passé à la chaux */
  --blanc: #FFFFFF;
  --trait: #E2D9CB;
  --peche: #FCE6D8;
  --rayon: 14px;
  --ombre: 0 1px 2px rgba(36, 32, 28, .06), 0 8px 24px rgba(36, 32, 28, .08);
  /* Sebka : le treillis de losanges des minarets almohades (tour Hassan, Koutoubia), en tracé fin. */
  --sebka: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='52'%3E%3Cpath d='M0 0Q14 6 20 26T40 52M40 0Q26 6 20 26T0 52' fill='none' stroke='%237A5638' stroke-opacity='.14'/%3E%3C/svg%3E");
  --sebka-orange: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='52'%3E%3Cpath d='M0 0Q14 6 20 26T40 52M40 0Q26 6 20 26T0 52' fill='none' stroke='%23E85D1A' stroke-opacity='.4' stroke-width='1.2'/%3E%3C/svg%3E");
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 1.0625rem/1.6 'Readex Pro', system-ui, sans-serif;
  color: var(--fer);
  background: var(--chaux) var(--sebka) 0 0 / 40px 52px;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brique); text-underline-offset: 3px; }
a:hover { color: var(--fer); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); }
.muted { color: var(--pierre); font-size: .95rem; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* En-tête */
.top { position: sticky; top: 0; z-index: 10; background: rgba(246, 242, 234, .92); border-bottom: 1px solid var(--trait); backdrop-filter: blur(8px); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--fer); }
.brand-mark { width: 44px; height: 44px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 600; font-size: 1.2rem; }
.brand-ar { font-size: .85rem; color: var(--pierre); }
.top-nav { display: flex; align-items: center; gap: 1.25rem; font-size: .95rem; }
.top-nav a { color: var(--fer); text-decoration: none; }
.top-nav a:hover { color: var(--brique); }
@media (max-width: 720px) { .top-nav .opt { display: none; } }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.3rem; border-radius: 999px;
  font: inherit; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer;
}
.btn svg { width: 20px; height: 20px; }
.btn-orange { background: var(--orange); color: var(--fer); }
.btn-orange:hover { background: var(--fer); color: var(--chaux); }
.btn-ligne { border-color: var(--fer); color: var(--fer); background: transparent; }
.btn-ligne:hover { background: var(--fer); color: var(--blanc); }
.btn-petit { padding: .5rem .95rem; font-size: .9rem; }
.top-nav .btn-petit { white-space: nowrap; }
@media (max-width: 420px) { .top-nav .btn-petit { padding: .45rem .7rem; font-size: .82rem; } }
/* Très petits écrans (moins de 360 px) : l'en-tête ne tenait pas. À 320 px il reste 280 px entre les marges, et le logo
   avec le nom, le lien de langue et le bouton en demandaient 313 : en français le bouton dépassait de l'écran de 13 px
   (la page défilait en largeur), en arabe il sortait de la marge du même écart. On resserre l'en-tête — écarts, logo, nom
   et bouton un peu plus petits — pour qu'il tienne entre les marges. Rien ne change à partir de 360 px (11/11/2026). */
@media (max-width: 359px) {
  .top-in { gap: .5rem; }
  .brand { gap: .45rem; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: 1.05rem; }
  .top-nav { gap: .6rem; }
  .top-nav .btn-petit { padding: .4rem .55rem; font-size: .78rem; }
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 1.5rem 0 .75rem; }
/* Haut de page (17/11/2026) : un seul bouton orange, celui de l'essai (il ouvre WhatsApp avec « inscription »), et un
   simple lien pour voir comment ça marche. Le lien garde 44 px de haut : la taille d'un doigt. */
.lien-suite { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .25rem; color: var(--fer); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.lien-suite:hover { color: var(--brique); }
/* Guides : le lien d'essai, dès le premier écran, sous le premier paragraphe. */
.guide-essai { margin: 1.25rem 0 1.5rem; }

/* Héros */
.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 880px) { .hero-in { grid-template-columns: 1fr; } }
.surtitre { display: inline-block; font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brique); margin-bottom: 1rem; }
.surtitre::before { content: ""; display: inline-block; width: 7px; height: 7px; border: 2px solid var(--orange); transform: rotate(45deg); vertical-align: .12em; margin: 0 .8rem 0 .2rem; }
.hero h1 em { font-style: normal; color: var(--orange); }
.lead { font-size: 1.2rem; color: #40392F; max-width: 34em; }

/* Téléphone (exemple fictif) */
.phone { position: relative; max-width: 380px; margin-inline: auto; background: var(--fer); border-radius: 34px; padding: 12px; box-shadow: 0 30px 60px rgba(36, 32, 28, .25); }
.phone-ecran { background: #EFEAE2; border-radius: 24px; overflow: hidden; }
.phone-tete { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; background: var(--blanc); border-bottom: 1px solid var(--trait); font-weight: 600; font-size: .95rem; }
.phone-tete img { width: 32px; height: 32px; border-radius: 50%; }
.phone-tete small { display: block; font-weight: 400; color: var(--pierre); font-size: .75rem; }
.fil { display: flex; flex-direction: column; gap: .5rem; padding: .9rem .7rem 1rem; font-size: .86rem; line-height: 1.45; }
.bulle { max-width: 88%; padding: .5rem .7rem; border-radius: 10px; background: var(--blanc); box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.bulle.moi { align-self: flex-end; background: #DCF3D6; }
.bulle .h { display: block; text-align: right; font-size: .68rem; color: var(--pierre); margin-top: .15rem; }
.vocal { display: flex; align-items: center; gap: .5rem; }
.vocal .play { width: 0; height: 0; border-left: 10px solid var(--pierre); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.vocal .onde { display: flex; align-items: center; gap: 2px; height: 22px; }
.vocal .onde i { display: block; width: 3px; border-radius: 2px; background: #7A8590; }
.transcrit { display: block; margin-top: .35rem; color: #40392F; font-style: italic; }
.recap b { font-weight: 600; }
.recap .lignes { margin: .35rem 0; padding: .35rem 0; border-block: 1px dashed var(--trait); }
.recap .ligne { display: flex; justify-content: space-between; gap: .75rem; }
.recap .nouveau { color: var(--brique); font-weight: 600; }
.recap .total { display: flex; justify-content: space-between; font-weight: 600; }
.pdf { display: flex; align-items: center; gap: .6rem; }
.pdf-ico { flex: none; width: 34px; height: 40px; border-radius: 4px; background: var(--orange); color: var(--blanc); font-size: .62rem; font-weight: 600; display: grid; place-items: center; }
.tampon { position: absolute; top: -12px; right: -10px; transform: rotate(6deg); background: var(--blanc); color: var(--brique); border: 2px solid var(--brique); border-radius: 6px; padding: .15rem .55rem; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.legende { max-width: 380px; margin: 1rem auto 0; text-align: center; font-size: .85rem; color: var(--pierre); }

/* Sections */
.sec { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.sec-blanche { background: var(--blanc); border-block: 1px solid var(--trait); }
.sec-tete { max-width: 40em; margin-bottom: 2.25rem; }

.etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; counter-reset: e; }
@media (max-width: 920px) { .etapes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .etapes { grid-template-columns: 1fr; } }
.etapes li { counter-increment: e; background: var(--chaux); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 1.4rem 1.25rem; }
.etapes li::before { content: counter(e, decimal-leading-zero); display: block; font-weight: 600; font-size: 1.6rem; color: var(--orange); font-variant-numeric: tabular-nums; margin-bottom: .4rem; }
.etapes p { margin: 0; color: #40392F; font-size: .98rem; }

/* La feuille de devis (exemple fictif) */
.duo { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 880px) { .duo { grid-template-columns: 1fr; } }
.feuille { position: relative; background: var(--blanc); border-radius: 6px; box-shadow: var(--ombre); padding: clamp(1.25rem, 4vw, 2.2rem); font-size: .88rem; border-top: 6px solid var(--orange); }
.feuille-tete { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.feuille-tete strong { font-size: 1.05rem; }
.feuille-tete .droite { text-align: right; }
.feuille table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.feuille th { text-align: left; font-weight: 600; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--pierre); border-bottom: 2px solid var(--fer); padding: .4rem .3rem; }
.feuille td { border-bottom: 1px solid var(--trait); padding: .5rem .3rem; vertical-align: top; }
.feuille .r { text-align: right; white-space: nowrap; }
.feuille .totaux { margin: 1rem 0 0 auto; width: min(260px, 100%); }
.feuille .totaux div { display: flex; justify-content: space-between; padding: .2rem 0; font-variant-numeric: tabular-nums; }
.feuille .totaux .ttc { border-top: 2px solid var(--fer); margin-top: .3rem; padding-top: .45rem; font-weight: 600; font-size: 1rem; }
.feuille .cond { margin: 1.25rem 0 0; color: var(--pierre); font-size: .8rem; }
.feuille .tampon { top: -18px; right: 18px; }
@media (max-width: 480px) { .feuille { font-size: .78rem; } .feuille th { font-size: .62rem; padding-inline: .15rem; } .feuille td { padding-inline: .15rem; } }
.points { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.points li { position: relative; padding-left: 1.9rem; margin-bottom: .8rem; }
.points li::before { content: ""; position: absolute; left: 0; top: .15em; width: 22px; height: 22px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cg fill='%23E85D1A'%3E%3Ccircle cx='10' cy='10' r='7'/%3E%3Ccircle cx='16.4' cy='10' r='3.5'/%3E%3Ccircle cx='14.53' cy='14.53' r='3.5'/%3E%3Ccircle cx='10' cy='16.4' r='3.5'/%3E%3Ccircle cx='5.47' cy='14.53' r='3.5'/%3E%3Ccircle cx='3.6' cy='10' r='3.5'/%3E%3Ccircle cx='5.47' cy='5.47' r='3.5'/%3E%3Ccircle cx='10' cy='3.6' r='3.5'/%3E%3Ccircle cx='14.53' cy='5.47' r='3.5'/%3E%3C/g%3E%3Cpath d='M6.3 10.3l2.6 2.6 5-5.4' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Règles de confiance */
.regles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 920px) { .regles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .regles { grid-template-columns: 1fr; } }
.regle { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 1.4rem 1.25rem; }
.regle svg { width: 30px; height: 30px; color: var(--orange); margin-bottom: .7rem; }
.regle p { margin: 0; color: #40392F; font-size: .98rem; }

.metiers { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 0; }
.metiers li { background: var(--chaux); border: 1px solid var(--trait); border-radius: 999px; padding: .5rem 1rem; font-weight: 500; }

/* Questions */
.faq details { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); margin-bottom: .75rem; }
.faq summary { cursor: pointer; padding: 1.05rem 1.25rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--orange); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 1.25rem 1.1rem; margin: 0; color: #40392F; }

/* Appel final */
.final { position: relative; background: var(--fer); color: var(--blanc); text-align: center; }
/* Créneaux de rempart de kasbah posés sur la bande sombre */
.final::before { content: ""; position: absolute; left: 0; right: 0; top: -25px; height: 26px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='26'%3E%3Cpath d='M6 26V12l11-10 11 10v14z' fill='%2324201C'/%3E%3C/svg%3E") left bottom / 36px 26px repeat-x; }
.final .btn-orange:hover { background: var(--chaux); color: var(--fer); }
.final h2 { color: var(--blanc); }
.final p { color: #D9D0C4; max-width: 36em; margin-inline: auto; }
.final .actions { justify-content: center; }
.final .btn-ligne { border-color: var(--blanc); color: var(--blanc); }
.final .btn-ligne:hover { background: var(--blanc); color: var(--fer); }
.final a:not(.btn) { color: #FFB892; }

/* Touche marocaine */
.darija { font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 500; color: var(--brique); text-align: left; margin: -.2rem 0 1.1rem; }
.hero-visuel { position: relative; padding-top: 1.5rem; }
.hero-visuel::before { content: ""; position: absolute; inset: 0 3% 4rem; border-radius: 28px; background: var(--peche) var(--sebka-orange) center / 40px 52px; }
.hero-visuel > * { position: relative; }
/* Téléphone : le haut de page se resserre pour que le téléphone d'exemple (le produit) commence dans le premier écran. */
@media (max-width: 560px) {
  .hero { padding-top: 1.25rem; }
  .surtitre { margin-bottom: .6rem; }
  .lead { font-size: 1.06rem; }
  .hero .actions { margin-top: 1rem; }
  .hero-in { gap: 1rem; }
  .hero-visuel { padding-top: .9rem; }
}
.metiers [lang="ar"] { color: var(--pierre); font-weight: 400; margin-left: .5rem; }
/* Devis d'exemple de l'accueil, aligné sur le vrai PDF (17/11/2026) : la case « Bon pour accord du client » et le titre
   « Conditions », comme le gabarit du moteur ; plus de cachet « Validé par l'entreprise », que le PDF ne porte pas. */
.bon-accord { display: grid; gap: .15rem; max-width: 17rem; margin-top: 1.1rem; padding: .6rem .8rem; border: 1px dashed var(--trait); border-radius: 6px; font-size: .8rem; }
.bon-accord strong { font-weight: 500; }
@media (max-width: 480px) { .feuille-tete .droite { text-align: left; } }   /* le numéro du devis passait sous le nom, décalé au milieu */
.feuille .cond-titre { display: block; margin-bottom: .15rem; font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

/* Pages de texte */
.texte h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.texte h2 { font-size: 1.3rem; margin-top: 2rem; }
.texte ul { padding-left: 1.2rem; }
.texte li { margin-bottom: .4rem; }

/* Pied de page */
.foot { border-top: 1px solid var(--trait); padding: 2rem 0; font-size: .9rem; color: var(--pierre); background: var(--chaux); }
.foot p { margin: .3rem 0; }
.foot a { color: var(--fer); }
.reseaux { display: flex; gap: .6rem; margin: .8rem 0; }
.foot .reseaux a { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--fer); color: var(--chaux); }
.foot .reseaux a:hover { background: var(--orange); color: var(--fer); }
.reseaux svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Version arabe (ar.html, dir="rtl") : pas d'espacement entre lettres (il casse la liaison), interligne plus grand */
[dir="rtl"] body { line-height: 1.8; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.4; }
[dir="rtl"] .surtitre { letter-spacing: 0; text-transform: none; font-size: .95rem; }
[dir="rtl"] .surtitre::before { margin: 0 .2rem 0 .8rem; }
[dir="rtl"] .darija { text-align: right; }
[dir="rtl"] .points li { padding-left: 0; padding-right: 1.9rem; }
[dir="rtl"] .points li::before { left: auto; right: 0; }
[dir="rtl"] .texte ul { padding-left: 0; padding-right: 1.2rem; }
[dir="rtl"] .transcrit { font-style: normal; }
/* Devis d'exemple écrit en arabe (guides) : en-têtes alignés sur leurs colonnes, nombres et totaux du côté gauche (10/11).
   Pas celui de l'accueil arabe, qui montre un devis en français (dir="ltr") et garde donc la mise en page d'origine. */
[dir="rtl"] .feuille:not([dir="ltr"]) th { text-align: right; }
[dir="rtl"] .feuille:not([dir="ltr"]) .r, [dir="rtl"] .feuille:not([dir="ltr"]) .feuille-tete .droite { text-align: left; }
[dir="rtl"] .feuille:not([dir="ltr"]) .totaux { margin: 1rem auto 0 0; }
/* Devis d'exemple sans montant (guides) : « votre prix », « calculé » en gris, à la taille du tableau */
.feuille td .muted, .feuille .totaux .muted { font-size: inherit; }

/* Bouton WhatsApp flottant (affiché par app.js quand WA_NUMBER est rempli) et sa bulle, dans un même coin de l'écran.
   Le coin ne prend pas les touchers ; seuls le bouton et la bulle les prennent. */
.wa-coin { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 12px; pointer-events: none; }
.wa-coin > * { pointer-events: auto; }
[dir="rtl"] .wa-coin { right: auto; left: 20px; }
.wa-flottant { position: relative; display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.1rem .8rem .9rem; border-radius: 999px; background: var(--orange); color: var(--fer); font-weight: 600; text-decoration: none; box-shadow: 0 8px 24px rgba(36, 32, 28, .28); transition: transform .2s ease; }
/* Le pictogramme est le seul dessin de Devis Diali (la page du devis, ses barres de vocal, le sceau) : choix du fondateur
   du 05/11, comme pour Scoliom. Le bouton ouvre la discussion du site : son texte (ordinateur) et son aria-label le
   disent (« Discuter », 17/11/2026) ; c'est le bouton d'essai du haut de page qui ouvre WhatsApp. */
.wa-icone { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; }
.wa-dessin { width: 36px; height: 36px; overflow: visible; }
.wa-dessin .b, .wa-dessin .wa-point, .wa-dessin .wa-pouls { transform-box: fill-box; transform-origin: center; }
.wa-dessin .wa-pouls { fill: var(--fer); opacity: 0; }   /* le halo du sceau n'existe que pendant l'animation */
.wa-flottant:hover { background: var(--fer); color: var(--chaux); transform: translateY(-2px); }
/* Téléphone : le mot « WhatsApp » se cache, il reste le dessin. */
@media (max-width: 560px) { .wa-flottant { padding: .8rem; } .wa-flottant > span:not(.wa-icone) { display: none; } }
/* La bulle : son texte double le bouton (hors du parcours clavier et des lecteurs d'écran), le « × » la ferme pour la visite. */
.wa-salut { position: relative; display: flex; align-items: center; min-width: 0; max-width: calc(100vw - 40px); background: var(--blanc); color: var(--fer); border: 1px solid rgba(36, 32, 28, .1); border-radius: 14px 14px 4px 14px; box-shadow: var(--ombre); transform-origin: bottom right; }
[dir="rtl"] .wa-salut { border-radius: 14px 14px 14px 4px; transform-origin: bottom left; }
.wa-texte { display: grid; min-width: 0; padding: .5rem .15rem .5rem .85rem; color: inherit; text-decoration: none; font-weight: 500; font-size: .92rem; line-height: 1.35; }
[dir="rtl"] .wa-texte { padding: .5rem .85rem .5rem .15rem; }
.wa-ecrit { display: flex; gap: 4px; max-height: 0; opacity: 0; overflow: hidden; }   /* les trois points n'existent que pendant l'animation */
.wa-ecrit i { width: 7px; height: 7px; border-radius: 50%; background: var(--pierre); }
.wa-msg { display: block; overflow: hidden; }
.wa-fermer { flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin: 0 2px; border: 0; border-radius: 50%; background: transparent; color: var(--pierre); font: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.wa-fermer:hover { background: var(--chaux); color: var(--fer); }
.wa-fermer:focus-visible { outline-offset: 0; border-radius: 50%; }
.wa-ferme .wa-salut, .wa-flottant[hidden] + .wa-salut { display: none; }
body.cw-ouvert .wa-salut { visibility: hidden !important; }   /* discussion ouverte : la bulle s'efface, même pendant son entrée */
/* Petits écrans : la bulle se met à côté du bouton, pour ne pas couvrir le contenu au-dessus de lui. */
@media (max-width: 479px) { .wa-coin { flex-direction: row-reverse; gap: 8px; } .wa-texte { font-size: .85rem; } }
/* Bas de page : la dernière ligne du pied reste lisible et touchable, au-dessus du bouton et de sa bulle. */
@media (max-width: 1199px) { body:has(.wa-coin) .foot { padding-bottom: 9rem; } }
@media (max-width: 479px) { body:has(.wa-coin) .foot { padding-bottom: 6rem; } }
@media print { .wa-coin { display: none; } }
/* Le bouton et sa bulle cèdent la place (17/11/2026, assets/app.js) : sur un titre, une consigne ou une commande de la
   page, ils s'effacent, puis reviennent. « !important » : l'emporte aussi pendant leur animation d'entrée. Le bouton
   effacé ne prend plus les touchers, mais le clavier le retrouve (le focus le montre). */
.wa-flottant { transition: transform .2s ease, opacity .2s ease; }
.wa-salut { transition: opacity .2s ease, visibility .2s; }
.wa-coin--cede .wa-salut { opacity: 0 !important; visibility: hidden !important; pointer-events: none; }
.wa-coin--efface .wa-flottant:not(:focus-visible) { opacity: 0 !important; pointer-events: none; }
/* Téléphone : la bulle n'arrive qu'une fois le haut de page dépassé (app.js pose .wa-coin--loin), puis presque aussitôt. */
@media (max-width: 479px) { .wa-coin:not(.wa-coin--loin) .wa-salut { display: none; } }
@media (max-width: 479px) and (prefers-reduced-motion: no-preference) {
  .wa-coin--loin .wa-salut { animation-delay: .3s; }
  .wa-coin--loin .wa-ecrit { animation-delay: .5s; }
  .wa-coin--loin .wa-msg { animation-delay: 2s; }
}
/* Animation du bouton, sur le modèle de maroclic.com (demande du fondateur du 11/11/2026 pour tous ses sites ; référence
   _khettara/maroclic/REFERENCE_BOUTON_ANIME.md), en CSS seul, mêmes départs et mêmes durées :
     0,4 s  le bouton entre ;
     1,5 s  puis toutes les 6 s : le « clic » — le sceau rétrécit, rebondit, se repose (c'est le coup de tampon), pendant
            que le dessin entier se tasse puis se relève ;
     1,92 s puis toutes les 3 s : une onde part autour du bouton ; le halo du sceau part avec le clic, une onde sur deux ;
     2,2 s  la bulle arrive ; de 2,4 à 3,9 s trois points « écrivent » ; à 3,9 s le message les remplace.
   La bulle reste jusqu'au « × » et ne revient pas pendant la visite (app.js). Gardé du dessin de Devis Diali : les trois
   barres qui parlent comme un vocal, une fois par cycle, APRÈS le clic et son halo (de 2,7 à 4,4 s du cycle) : jamais
   deux mouvements au même instant dans le dessin. Un élément, une animation ; « backwards », jamais « forwards » (sinon le
   bouton ne se soulève plus au survol). Mouvement réduit : rien ne bouge et la bulle n'apparaît pas. */
@media (prefers-reduced-motion: no-preference) {
  .wa-flottant { animation: wa-entre .5s cubic-bezier(.2, .8, .2, 1) .4s backwards; }
  .wa-flottant::before { content: ""; position: absolute; inset: -3px; border: 3px solid var(--orange); border-radius: inherit; opacity: 0; pointer-events: none; animation: wa-onde 3s ease-out 1.92s infinite; }
  .wa-dessin { animation: wa-appui 6s ease-in-out 1.5s infinite; }
  .wa-dessin .wa-point { animation: wa-clic 6s ease-in-out 1.5s infinite; }
  .wa-dessin .wa-pouls { animation: wa-pouls 6s ease-out 1.92s infinite; }
  .wa-dessin .b { animation: wa-vocal 6s ease-in-out 1.5s infinite; }
  .wa-dessin .b2 { animation-delay: 1.65s; }
  .wa-dessin .b3 { animation-delay: 1.8s; }
  body.cw-ouvert .wa-flottant::before, body.cw-ouvert .wa-dessin, body.cw-ouvert .wa-dessin .wa-point, body.cw-ouvert .wa-dessin .wa-pouls, body.cw-ouvert .wa-dessin .b { animation: none; }
  .wa-salut { animation: wa-bulle .45s cubic-bezier(.2, .8, .2, 1) 2.2s backwards; }
  .wa-ecrit { animation: wa-ecrit 1.5s linear 2.4s backwards; }
  .wa-ecrit i { animation: wa-point 1s ease-in-out infinite; }
  .wa-ecrit i:nth-child(2) { animation-delay: .15s; }
  .wa-ecrit i:nth-child(3) { animation-delay: .3s; }
  .wa-msg { animation: wa-msg .4s ease 3.9s backwards; }
}
/* Ordinateur : le bouton est large (dessin + « WhatsApp »), l'onde s'étire moins en largeur pour rester dans l'écran. */
@media (prefers-reduced-motion: no-preference) and (min-width: 561px) { .wa-flottant::before { animation-name: wa-onde-large; } }
@keyframes wa-entre { from { opacity: 0; transform: translateY(12px) scale(.9); } to { opacity: 1; transform: none; } }
/* La bulle, avant son entrée, n'est pas seulement transparente : elle n'existe pas pour le doigt ni pour le clavier. */
@keyframes wa-bulle { from { opacity: 0; transform: translateY(12px) scale(.9); visibility: hidden; } to { opacity: 1; transform: none; visibility: visible; } }
@keyframes wa-onde { 0% { opacity: .55; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.5); } }
@keyframes wa-onde-large { 0% { opacity: .55; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.2, 1.5); } }
@keyframes wa-pouls { 0% { opacity: .5; transform: scale(1); } 35%, 100% { opacity: 0; transform: scale(2.2); } }
@keyframes wa-clic { 0%, 14%, 100% { transform: none; } 3% { transform: scale(.45); } 7% { transform: scale(1.3); } 10.5% { transform: scale(.92); } }
@keyframes wa-appui { 0%, 11%, 100% { transform: none; } 3% { transform: translateY(1.5px) scale(.9); } 7% { transform: scale(1.04); } }
@keyframes wa-vocal { 0%, 45%, 69%, 100% { transform: none; } 49%, 57% { transform: scaleY(.55); } 53%, 61% { transform: scaleY(1.12); } 65% { transform: scaleY(.75); } }
@keyframes wa-ecrit { 0%, 90% { max-height: 16px; opacity: 1; padding: 4px 0; } 100% { max-height: 0; opacity: 0; padding: 0; } }
@keyframes wa-point { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-3px); opacity: 1; } }
@keyframes wa-msg { from { opacity: 0; max-height: 0; } to { opacity: 1; max-height: 4em; } }
@media (prefers-reduced-motion: reduce) { .wa-flottant { transition: none; } .wa-flottant:hover { transform: none; } .wa-salut { display: none; } }

/* Chat web commun maroclic (assets/chat-web.css) aux couleurs de Devis Diali : texte fer forgé sur orange, comme les boutons.
   « body .cw » : chat-web.css est chargé après styles.css, un simple « .cw » perdait. */
body .cw { --cw-accent: #E85D1A; --cw-accent-texte: #24201C; --cw-moi-texte: #24201C; }

/* Statut honnête sous les premiers boutons (03/11/2026) */
.statut { border-left: 3px solid var(--orange); padding-left: .7rem; }
[dir="rtl"] .statut { border-left: 0; border-right: 3px solid var(--orange); padding-left: 0; padding-right: .7rem; }

/* Autres services maroclic, en pied de page */
.foot .famille { max-width: 46rem; }

/* Ligne d'information sur la mesure et la publicité (assets/accord.js, décision du fondateur du 06/11/2026, retouche de
   21:53) : une ligne fine en bas de l'écran, sans voile, texte court et « ✕ » (le refus est dans la page de
   confidentialité). Le bouton WhatsApp flottant et le bas de page montent de la hauteur réelle de la ligne (accord.js la
   pose dans --accord-h) ; la discussion du site (z-index 1000) passe devant. */
.accord { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 12px; padding: 6px 48px 6px 14px; background: var(--fer); color: var(--chaux); font-size: 13px; line-height: 1.35; text-align: center; box-shadow: 0 -2px 12px rgba(36, 32, 28, .18); }
[dir="rtl"] .accord { padding: 6px 14px 6px 48px; }
.accord__texte { margin: 0; }
.accord a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.accord__fermer { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--chaux); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
[dir="rtl"] .accord__fermer { right: auto; left: 6px; }
.accord a:focus-visible, .accord__fermer:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.accord__fermer:hover { color: var(--orange); }
body:has(.accord) .wa-coin { bottom: calc(var(--accord-h, 0px) + 20px); }
body:has(.accord) { padding-bottom: var(--accord-h, 0px); }
@media (max-width: 480px) { .accord { padding: 5px 42px 5px 10px; } [dir="rtl"] .accord { padding: 5px 10px 5px 42px; } .accord__fermer { right: 1px; width: 38px; height: 38px; } [dir="rtl"] .accord__fermer { left: 1px; } }
@media print { .accord { display: none; } }
