/* =====================================================================
   Module WhatsApp — composant partage
   ---------------------------------------------------------------------
   Le lien discret (.wa-line) et la pop-up a deux entrees (.wam) : sur
   ordinateur, ouvrir l'application ou scanner le QR code ; sur mobile, le
   lien ouvre directement la conversation.

   Utilise par /merci-pdv et /merci-demo-2. Les deux pages en avaient une
   COPIE : celle de /merci-demo-2 avait perdu la regle de base .wa-btn, et
   le bouton « Ouvrir l'application » s'affichait en blanc sur blanc. C'est
   exactement ce que ce fichier empeche.

   Le comportement vit dans js/whatsapp.js. Comme les autres composants
   partages : var() avec valeur de repli, aucun :root redeclare, et bumper
   le ?v=N apres modification (_headers sert /css/* en immutable un an).

   Sur fond sombre, la page hote pose .wa-line--clair sur le lien.
   ===================================================================== */


/* Deux gros boutons cote a cote se faisaient concurrence : le bouton
   principal de la page reste seul en avant, WhatsApp devient un lien
   discret juste dessous, pour ceux qui veulent parler a quelqu'un. */
/* Une pastille bordee, pas un lien souligne flottant a cote d'un gros bouton.
   Valentin, 22/08 : « c'est bizarre le design, mets-le dans notre DA ». Le
   filet fin et le coin plein rond sont ceux du reste du site ; le bouton
   principal garde son aplat, celui-ci n'en a pas. */
/* Une ligne, pas une pastille. Valentin, 23/08 : « enleve le rond et la
   colonne, une seule ligne, mais on doit comprendre que c'est un CTA
   secondaire ». Le souligne fin de la seconde moitie fait ce travail : c'est
   la convention du lien, sans l'aplat qui concurrencerait le bouton. */
.wa-line {
    display: inline-flex; align-items: center; gap: 9px;
    margin-top: 20px; padding: 6px 2px;
    background: none; border: 0; cursor: pointer; text-decoration: none;
    font-family: var(--font-body, inherit); font-size: var(--t-sm, 1.04rem);
    color: var(--espresso, #1C1611);
    transition: color .18s ease;
}
.wa-line:hover { color: var(--sienna, #BA4A2C); }
.wa-line:hover u { text-decoration-color: currentColor; }
/* Variante fond sombre. */
.wa-line--clair { color: rgba(255,255,255,0.8); }
.wa-line--clair:hover { color: #fff; }
/* Le pictogramme n'a plus de disque : c'est lui qui dit le canal, pas un rond. */
.wa-line-ico { display: inline-flex; flex-shrink: 0; }
.wa-line-ico svg { width: 20px; height: 20px; fill: currentColor; opacity: 0.9; }
/* Plus de souligne : la pastille suffit a dire que c'est cliquable. */
.wa-line u { text-decoration: underline; text-underline-offset: 4px;
    text-decoration-thickness: 1px; text-decoration-color: rgba(128,128,128,0.5); font-weight: 600; }
/* Sur mobile, la pastille prenait presque toute la largeur et concurrencait
   le bouton principal. Valentin, 23/08 : « trop gros sur mobile ». */
@media (max-width: 560px) {
    .wa-line { margin-top: 16px; padding: 8px 16px 8px 13px; gap: 8px; font-size: 0.86rem; }
    .wa-line-ico svg { width: 18px; height: 18px; }
}

/* Bouton plein : conserve pour la pop-up (« Cliquer ici ») */
.wa-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--wa, #25D366); color: #fff; border: 0; cursor: pointer; text-decoration: none;
    padding: 13px 24px; border-radius: 999px;
    font-family: var(--font-body, inherit); font-weight: 700; font-size: 0.98rem;
    box-shadow: 0 14px 32px -12px rgba(37,211,102,0.55);
    transition: background .2s ease, transform .2s ease;
}
.wa-btn:hover { background: var(--wa-d, #1DA851); transform: translateY(-1px); }
.wa-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Pop-up WhatsApp (desktop uniquement) ---------- */
.wam { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 22px; }
.wam.is-open { display: flex; }
.wam-backdrop { position: absolute; inset: 0; background: rgba(20,16,12,0.82); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
/* La pop-up pose SA propre couleur d'encre. Sans ca, elle heritait de celle
   de la page hote : sur /merci-demo-2, dont le texte ambiant est blanc, le
   nom « Discuter avec Valentin » et les titres de colonnes s'affichaient en
   blanc sur blanc. Une carte blanche ne peut pas dependre du fond d'a cote. */
.wam-card {
    position: relative; background: #fff; color: var(--espresso, #1C1611);
    border-radius: 24px; max-width: 720px; width: 100%;
    padding: 40px 38px 32px;
    box-shadow: 0 40px 90px -30px rgba(20,16,12,0.7);
    animation: wamPop .26s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes wamPop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.wam-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; background: rgba(28,22,17,0.06); border-radius: 50%; cursor: pointer; color: var(--zinc, #5A5048); display: flex; align-items: center; justify-content: center; }
.wam-close:hover { background: rgba(28,22,17,0.12); }
.wam-close svg { width: 16px; height: 16px; }

/* En-tete : « Discuter avec Valentin, co-fondateur » + sa photo */
.wam-head { display: flex; gap: 14px; align-items: center; padding-bottom: 24px; margin-bottom: 26px; border-bottom: 1px solid var(--line, rgba(28,22,17,0.1)); }
.wam-photo { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 8px 20px -6px rgba(28,22,17,0.4); }
.wam-who { display: block; font-family: var(--font-display, inherit); font-weight: 600; font-size: 1.24rem; line-height: 1.25; color: var(--espresso, #1C1611); }
.wam-role { display: block; color: var(--zinc, #5A5048); font-size: 0.92rem; margin-top: 3px; }

/* Deux colonnes : ordinateur a gauche, telephone a droite */
.wam-grid { display: grid; gap: 26px; }
@media (min-width: 640px) { .wam-grid { grid-template-columns: 1fr 1px 1fr; align-items: start; } }
.wam-sep { display: none; background: var(--line, rgba(28,22,17,0.1)); align-self: stretch; }
@media (min-width: 640px) { .wam-sep { display: block; } }
.wam-col { text-align: center; }
.wam-col-ico { display: block; width: 34px; height: 34px; margin: 0 auto 12px; color: var(--wa, #25D366); }
.wam-col-ico svg { width: 100%; height: 100%; fill: currentColor; }
.wam-col-t { font-weight: 700; font-size: 1.14rem; margin-bottom: 7px; color: var(--espresso, #1C1611); }
.wam-col-d { color: var(--zinc, #5A5048); font-size: var(--t-sm, 1.04rem); line-height: 1.5; margin-bottom: 16px; }
.wam-col .wa-btn { padding: 13px 24px; font-size: 0.98rem; }
.wam-col .wa-btn svg { width: 20px; height: 20px; }
.wam-qr { width: 168px; height: 168px; margin: 0 auto; padding: 10px; background: #fff; border: 1px solid var(--line, rgba(28,22,17,0.1)); border-radius: 14px; display: block; }
.wam-qr img { width: 100%; height: 100%; display: block; }
.wam-qr-note { display: block; margin-top: 10px; color: var(--zinc, #5A5048); font-size: 0.92rem; }
.wam-fallback { display: block; margin-top: 14px; color: var(--zinc, #5A5048); font-size: 0.92rem; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(0,0,0,0.2); }
.wam-fallback:hover { color: var(--espresso, #1C1611); }
@media (max-width: 639px) {
    .wam-card { padding: 30px 22px 24px; }
    .wam-grid { gap: 24px; }
}
