/* ==========================================================================
   « Choisir à deux » (design "Corail") — includes/fcts_duo.php
   Page /{compte}/duo : templates/account_duo.tpl (.du)
   Page swipe : bandeau (.du-bar) et fenêtre « C'est un match ! » (.du-match), templates/tools_swipe.tpl
   Prénom choisi (.du-decide, .du-chosen) et page communauté « Ils ont choisi ensemble » (.tg-*) : includes/fcts_duo_choice.php
   Chargé par templates/includes/header.tpl sur account_duo, tools_swipe et community_together (après pages.css / tools.css / community.css).
   ========================================================================== */

/* Repris de tools.css (non chargé sur la page du duo) */
.du .tl-dot{ flex:none; display:inline-block; width:10px; height:10px; border-radius:50%; background:var(--pg-x); }
.du .tl-dot.is-f{ background:var(--pg-f); }
.du .tl-dot.is-m{ background:var(--pg-m); }
.du .tl-count{ display:inline-grid; place-items:center; min-width:26px; height:26px; padding:0 8px; border-radius:999px; background:var(--pg-coral); color:#fff;
	font-family:'DM Sans',sans-serif; font-size:13px; font-weight:700; letter-spacing:0; vertical-align:middle; font-variant-numeric:tabular-nums; }

.pg .du-h1{ margin:14px 0 10px; }
.pg .du-p{ font-size:15.5px; line-height:1.55; color:var(--pg-text2); max-width:640px; }
.du-form{ margin:0; }
.du-head{ margin-bottom:20px; }

/* Pastilles du duo (initiales + cœur) */
.du-pair{ position:relative; display:inline-flex; align-items:center; flex:none; }
.du-av{ width:52px; height:52px; border-radius:50%; display:grid; place-items:center; background:#fff; color:var(--pg-ink); border:3px solid #fff;
	font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:21px; line-height:1; box-shadow:0 6px 14px -8px rgba(80,40,30,.45); }
.du-av.is-p{ background:var(--pg-tint); color:var(--pg-coral-d); }
.du-av + .du-av{ margin-left:-14px; }
.du-pair-h{ position:absolute; left:50%; bottom:-6px; transform:translateX(-50%); width:24px; height:24px; border-radius:50%; background:var(--pg-coral);
	color:#fff; display:grid; place-items:center; font-size:11px; line-height:1; border:2px solid #fff; }
.du-pair-s .du-av{ width:38px; height:38px; font-size:16px; border-width:2px; }
.du-pair-s .du-av + .du-av{ margin-left:-10px; }

/* ---------- Présentation (visiteur) ---------- */
.du-hero{ display:grid; grid-template-columns:minmax(0,1fr); gap:32px; align-items:center; margin:16px 0 24px; background:var(--pg-tint);
	border-radius:32px; padding:clamp(22px,4.5vw,52px); overflow:hidden; }
@media (min-width:880px){ .du-hero{ grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr); } }
.du-hero-t{ display:flex; flex-direction:column; align-items:flex-start; min-width:0; }
.du-hero .du-pair{ margin-bottom:14px; }
.pg .du-lead{ font-size:17px; line-height:1.55; color:var(--pg-text2); max-width:560px; text-wrap:pretty; }
.du-ctas{ display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.pg .du-ctas .pg-btn{ white-space:normal; text-align:center; }
.pg .du-ctas .pg-btn-line{ height:52px; }

/* Illustration : deux cartes « Emma ♥ » et le badge du match */
.du-art{ position:relative; justify-self:center; width:100%; max-width:360px; height:270px; }
.du-art-c{ position:absolute; top:6px; width:60%; height:220px; display:flex; flex-direction:column; justify-content:space-between; gap:10px;
	background:#fff; border-radius:28px; padding:18px; box-shadow:0 18px 34px -18px rgba(80,40,30,.45); }
.du-art-c.is-l{ left:0; transform:rotate(-8deg); }
.du-art-c.is-r{ right:0; top:0; transform:rotate(7deg); }
.du-art-tag{ align-self:flex-start; display:inline-flex; align-items:center; gap:6px; background:var(--pg-field); border-radius:999px; padding:5px 10px;
	font-size:12px; font-weight:700; color:var(--pg-text2); }
.du-art-n{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:44px; letter-spacing:-.04em; line-height:1; color:var(--pg-ink); }
.du-art-y{ align-self:flex-end; width:44px; height:44px; border-radius:50%; background:var(--pg-coral); color:#fff; display:grid; place-items:center; font-size:19px; }
.du-art-m{ position:absolute; left:50%; bottom:4px; transform:translateX(-50%) rotate(-2deg); background:var(--pg-ink); color:#fff; border-radius:999px;
	padding:11px 20px; font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:19px; letter-spacing:-.01em; white-space:nowrap;
	box-shadow:0 14px 26px -14px rgba(0,0,0,.6); }
@media (max-width:420px){ .du-art{ height:240px; } .du-art-c{ height:190px; } .du-art-n{ font-size:36px; } }

/* Étapes */
.du-steps{ display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr)); gap:12px; margin:0 0 8px; }
.du-step{ background:#fff; border:1px solid var(--pg-line); border-radius:24px; padding:18px 20px 20px; display:flex; flex-direction:column; gap:6px; }
.du-step-n{ width:32px; height:32px; margin-bottom:6px; border-radius:50%; background:var(--pg-tint); color:var(--pg-coral-d); display:grid; place-items:center;
	font-weight:800; font-size:14px; }
.pg .du-step-t{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:19px; letter-spacing:-.015em; line-height:1.2; }
.pg .du-step-d{ font-size:14.5px; line-height:1.5; color:var(--pg-text2); }

/* ---------- Invitation reçue / lien à envoyer ---------- */
.du-invite{ align-items:flex-start; margin-bottom:24px; }
.du-invite .du-pair{ margin-bottom:8px; }
.du-invite .pg-alert{ margin:0; }
.du-link{ margin-bottom:16px; }
.pg .du-link .pg-h3, .pg .du-invite .pg-h3{ font-size:clamp(22px,2.6vw,28px); }
.du-copy{ display:flex; gap:8px; }
.pg .du-copy input{ flex:1; min-width:0; height:50px; margin:0; padding:0 16px; border:1px solid var(--pg-line2); border-radius:14px; background:var(--pg-paper);
	color:var(--pg-ink); font:inherit; font-size:15px; outline:none; box-shadow:none; }
.pg .du-copy input:focus{ border-color:var(--pg-tint-bd) !important; background:#fff; box-shadow:0 0 0 3px var(--pg-tint); }
.pg .du-copy .pg-btn{ height:50px; border-radius:14px; padding:0 20px; }
.du-share{ display:flex; flex-wrap:wrap; gap:8px; }
@media (pointer:fine){ .pg .du-native{ display:none; } }
.pg .du-cancel{ font-size:13.5px; font-weight:600; color:var(--pg-muted); text-decoration:underline; text-underline-offset:3px; }
.pg .du-cancel:hover{ color:var(--pg-coral-d); }
@media (max-width:480px){ .du-copy{ flex-direction:column; } .pg .du-copy input{ flex:none; } }

/* ---------- Duo actif ---------- */
.du-couple{ display:flex; align-items:center; gap:16px 18px; flex-wrap:wrap; background:var(--pg-ink); color:#fff; border-radius:28px; padding:18px 22px; margin:0 0 12px; }
.du-couple .du-av{ border-color:var(--pg-ink); box-shadow:none; }
.du-couple .du-pair-h{ border-color:var(--pg-ink); }
.pg .du-couple-t{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:clamp(22px,2.8vw,30px); letter-spacing:-.025em; line-height:1.15;
	color:#fff; overflow-wrap:anywhere; }
.du-stats{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0 0 36px; }
.pg .du-stat{ background:#fff; border:1px solid var(--pg-line); border-radius:22px; padding:16px 18px; display:flex; flex-direction:column; gap:4px; min-width:0; }
.du-stat b{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:clamp(28px,3.4vw,38px); letter-spacing:-.03em; line-height:1; font-variant-numeric:tabular-nums; }
.du-stat span{ font-size:13.5px; line-height:1.35; color:var(--pg-muted); overflow-wrap:anywhere; }
.pg .du-stat.is-main{ background:var(--pg-coral-d); border-color:var(--pg-coral-d); color:#fff; }
.du-stat.is-main span{ color:#ffe1da; }
@media (max-width:560px){ .du-stats{ grid-template-columns:1fr 1fr; } .pg .du-stat.is-main{ grid-column:1/-1; } }

.du-sec{ margin:0 0 32px; }
.du-sec .pg-sh{ align-items:center; }

/* Grille des prénoms (matchs, coups de cœur) */
.du-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,190px),1fr)); gap:10px; }
.du-m{ display:flex; flex-direction:column; gap:14px; min-width:0; background:var(--pg-tint); border-radius:22px; padding:14px 14px 16px 16px; }
.du-m-top{ display:flex; justify-content:space-between; align-items:center; gap:8px; }
.pg .du-m-n{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:26px; letter-spacing:-.03em; line-height:1.05; color:var(--pg-ink); overflow-wrap:anywhere; }
.pg .du-m-n:hover{ color:var(--pg-coral-d); }
.pg .du-m-x{ width:28px; height:28px; border-radius:50%; background:#fff; color:var(--pg-coral-d); display:grid; place-items:center; font-size:11px; line-height:1; }
.pg .du-m-x:hover{ background:var(--pg-coral-d); color:#fff; }
.du-grid-s{ grid-template-columns:repeat(auto-fill,minmax(min(100%,150px),1fr)); gap:8px; }
.du-grid-s .du-m{ gap:8px; padding:10px 10px 12px 14px; border-radius:18px; background:#fff; border:1px solid var(--pg-line); }
.pg .du-grid-s .du-m-n{ font-size:19px; letter-spacing:-.015em; }
.du-grid-s .du-m-x{ background:var(--pg-field); }
.pg .du-empty{ display:flex; flex-wrap:wrap; gap:6px 12px; align-items:center; }

/* Coups de cœur repliables, quitter le duo */
.du-likes > summary{ list-style:none; cursor:pointer; margin-bottom:16px; }
.pg .du-likes > summary .pg-h3{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; }
.du-likes > summary::-webkit-details-marker{ display:none; }
.du-likes > summary::after{ content:'+'; flex:none; width:32px; height:32px; border-radius:50%; background:var(--pg-field); display:grid; place-items:center; font-weight:600; font-size:18px; }
.du-likes[open] > summary::after{ content:'\2212'; }
.du-leave{ margin-top:8px; padding-top:18px; border-top:1px solid var(--pg-line); display:flex; flex-direction:column; gap:12px; }
.du-leave > summary{ list-style:none; cursor:pointer; align-self:flex-start; font-size:13.5px; font-weight:600; color:var(--pg-muted); text-decoration:underline; text-underline-offset:3px; }
.du-leave > summary::-webkit-details-marker{ display:none; }
.du-leave > summary:hover{ color:var(--pg-coral-d); }
.du-leave[open] > summary{ margin-bottom:10px; }
.du-leave .du-form{ margin-top:12px; }

/* ---------- Page swipe : bandeau « Choisir à deux » ---------- */
.du-bar{ display:flex; align-items:center; gap:12px 14px; flex-wrap:wrap; background:#fff; border:1px solid var(--pg-line); border-radius:22px; padding:12px 12px 12px 14px; margin:0 0 18px; }
.du-bar-ic{ flex:none; width:40px; height:40px; border-radius:14px; background:var(--pg-tint); color:var(--pg-coral-d); display:grid; place-items:center; font-size:18px; }
.pg .du-bar-t{ flex:1 1 260px; min-width:0; font-size:14.5px; line-height:1.45; color:var(--pg-text2); }
.du-bar-t strong{ color:var(--pg-ink); font-weight:700; }
.du-bar-n{ display:inline-block; margin-left:4px; border-radius:999px; padding:2px 10px; background:var(--pg-coral); color:#fff; font-weight:700; font-size:13px; white-space:nowrap; }
.pg .du-bar-a{ flex:none; }
.pg .du-bar.is-on{ background:var(--pg-ink); border-color:var(--pg-ink); }
.du-bar.is-on .du-bar-t, .du-bar.is-on .du-bar-t strong{ color:#fff; }
.du-bar.is-on .du-av{ border-color:var(--pg-ink); box-shadow:none; }
@media (max-width:520px){ .pg .du-bar-a{ width:100%; } }

/* Coups de cœur au-delà des premiers (lien vers la page du duo) */
.pg .tl-favs-list li.tl-more{ padding:0 12px; }

/* ---------- Page swipe : « C'est un match ! » ---------- */
.du-match{ position:fixed; inset:0; z-index:100000; display:grid; place-items:center; padding:16px; background:rgba(43,36,33,.55); }
.pg .du-match[hidden]{ display:none !important; }
.du-match-box{ width:min(100%,380px); background:#fff; border-radius:32px; padding:28px 22px 22px; display:flex; flex-direction:column; align-items:center; gap:8px;
	text-align:center; box-shadow:0 30px 60px -20px rgba(0,0,0,.45); animation:du-pop .4s cubic-bezier(.2,1.5,.4,1); }
.du-match-h, .pg .du-match-h{ display:flex; font-size:30px; line-height:1; color:var(--pg-coral); }
.du-match-h span{ display:block; animation:du-beat 1s ease-in-out .3s 2; }
.du-match-h span + span{ margin-left:-8px; color:var(--pg-coral-d); animation-delay:.45s; }
.pg .du-match-t{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:30px; letter-spacing:-.03em; line-height:1.1; }
.pg .du-match-n{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:clamp(36px,11vw,54px); letter-spacing:-.04em; line-height:1.05;
	color:var(--pg-coral-d); overflow-wrap:anywhere; }
.pg .du-match-d{ font-size:15px; color:var(--pg-text2); }
.du-match-acts{ display:flex; flex-direction:column; gap:8px; width:100%; margin-top:10px; }
.pg .du-match-acts .pg-btn{ width:100%; }
@keyframes du-pop{ from{ transform:scale(.85); opacity:0; } to{ transform:none; opacity:1; } }
@keyframes du-beat{ 0%, 100%{ transform:scale(1); } 50%{ transform:scale(1.25); } }
@media (prefers-reduced-motion:reduce){ .du-match-box, .du-match-h span{ animation:none; } }

/* ---------- Prénom choisi par le couple (includes/fcts_duo_choice.php) ---------- */
.du-stats + .du-decide, .du-stats + .du-chosen{ margin-top:-20px; }

/* « Ça y est, vous avez choisi ? » (formulaire replié) */
.du-decide{ background:#fff; border:1px solid var(--pg-line); border-radius:24px; margin:0 0 36px; }
.du-decide > summary{ list-style:none; cursor:pointer; display:flex; align-items:center; gap:12px 14px; flex-wrap:wrap; padding:14px 14px 14px 16px; }
.du-decide > summary::-webkit-details-marker{ display:none; }
.du-decide-ic{ flex:none; width:44px; height:44px; border-radius:14px; background:var(--pg-tint); color:var(--pg-coral-d); display:grid; place-items:center; font-size:19px; }
.pg .du-decide-t{ flex:1 1 260px; min-width:0; font-size:14.5px; line-height:1.45; color:var(--pg-text2); }
.du-decide-t strong{ display:block; font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:19px; letter-spacing:-.015em; line-height:1.25; color:var(--pg-ink); }
.pg .du-decide-b{ flex:none; }
.du-decide[open] .du-decide-b{ display:none; }
.du-decide > .du-choose-f{ margin:0 20px; padding:18px 0 22px; border-top:1px solid var(--pg-line); }
@media (max-width:520px){ .pg .du-decide-b{ width:100%; } .du-decide > .du-choose-f{ margin:0 16px; } }

/* Formulaire : prénom parmi les matchs, options de publication */
.du-choose-f{ display:flex; flex-direction:column; gap:14px; }
.du-picks{ border:0; margin:0; padding:0; min-width:0; }
.pg .du-picks legend{ width:auto; margin-bottom:8px; padding:0; border:0; }
.du-picks-l{ display:flex; flex-wrap:wrap; gap:8px; max-height:236px; overflow:auto; padding:2px; }
.du-pick{ position:relative; margin:0; cursor:pointer; }
.du-pick input{ position:absolute; opacity:0; width:1px; height:1px; margin:0; }
.du-pick span{ display:inline-flex; align-items:center; gap:7px; height:40px; padding:0 16px 0 12px; border-radius:999px; background:var(--pg-field); border:2px solid transparent;
	font-family:'Bricolage Grotesque',sans-serif; font-weight:700; font-size:16px; color:var(--pg-ink); }
.du-pick span::before{ content:''; flex:none; width:9px; height:9px; border-radius:50%; background:var(--pg-x); }
.du-pick.is-f span::before{ background:var(--pg-f); }
.du-pick.is-m span::before{ background:var(--pg-m); }
.du-pick:hover span{ border-color:var(--pg-tint-bd); }
.du-pick input:checked + span{ background:var(--pg-coral-d); border-color:var(--pg-coral-d); color:#fff; }
.du-pick input:checked + span::before{ background:#fff; }
.du-pick input:focus-visible + span{ outline:2px solid var(--pg-coral-d); outline-offset:2px; }
.du-opt strong{ color:var(--pg-ink); font-weight:700; }
.pg .du-opt .pg-hint{ margin-top:2px; }
.du-choose-f:has(input[name="public"]:not(:checked)) .du-opt-names{ opacity:.45; pointer-events:none; }
.pg .du-choose-note{ margin:0; }
.pg .du-choose-f .pg-btn{ align-self:flex-start; }

/* Choix enregistré */
.du-chosen{ margin:0 0 32px; border-radius:28px; background:#f2edf9; padding:clamp(20px,3vw,28px); display:flex; flex-direction:column; gap:18px; }
.du-chosen.is-f{ background:#fbeef4; }
.du-chosen.is-m{ background:#eaf3fb; }
.du-chosen-top{ display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:18px 28px; }
.du-chosen-t{ display:flex; flex-direction:column; align-items:flex-start; gap:4px; min-width:0; }
.pg .du-chosen-k{ display:inline-flex; align-items:center; gap:6px; margin-bottom:6px; border-radius:999px; background:var(--pg-coral-d); color:#fff; padding:5px 12px;
	font-size:12.5px; font-weight:700; letter-spacing:.02em; text-transform:uppercase; }
.pg .du-chosen-n{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:clamp(46px,8vw,72px); letter-spacing:-.045em; line-height:1; color:var(--pg-ink); overflow-wrap:anywhere; }
.pg a.du-chosen-n:hover{ color:var(--pg-coral-d); }
.pg .du-chosen-w{ font-size:14.5px; font-weight:600; color:var(--pg-text2); }
.du-chosen-st{ display:flex; flex-wrap:wrap; gap:8px; margin:0; padding:0; list-style:none; }
.du-chosen-st li{ display:flex; flex-direction:column; gap:3px; min-width:112px; background:#fff; border-radius:18px; padding:12px 16px; }
.du-chosen-st b{ font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:28px; letter-spacing:-.03em; line-height:1; font-variant-numeric:tabular-nums; }
.du-chosen-st span{ font-size:12.5px; line-height:1.3; color:var(--pg-muted); }
.du-chosen-f{ display:flex; flex-direction:column; gap:10px; padding-top:14px; border-top:1px solid rgba(43,36,33,.1); }
.pg .du-chosen-vis{ font-size:14px; line-height:1.5; color:var(--pg-text2); }
.du-chosen-edit{ display:flex; flex-direction:column; }
.du-chosen-edit > summary{ list-style:none; cursor:pointer; align-self:flex-start; font-size:13.5px; font-weight:600; color:var(--pg-ink); text-decoration:underline; text-underline-offset:3px; }
.du-chosen-edit > summary::-webkit-details-marker{ display:none; }
.du-chosen-edit > summary:hover{ color:var(--pg-coral-d); }
.du-chosen-edit[open] > summary{ margin-bottom:12px; }
.du-chosen-edit .du-choose-f{ background:#fff; border-radius:20px; padding:18px; margin-bottom:12px; }
@media (max-width:560px){ .du-chosen-st{ width:100%; } .du-chosen-st li{ flex:1 1 0; min-width:0; padding:10px 12px; } .du-chosen-st b{ font-size:24px; } }

/* ---------- Page communauté « Ils ont choisi ensemble » (templates/community_together.tpl) ---------- */
.tg-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr)); gap:14px; }
.tg-card{ position:relative; display:flex; flex-direction:column; gap:8px; min-width:0; border-radius:24px; padding:20px 18px 16px; background:#f2edf9; }
.tg-card.is-f{ background:#fbeef4; }
.tg-card.is-m{ background:#eaf3fb; }
.tg-card-h{ position:absolute; top:18px; right:16px; display:flex; font-size:15px; line-height:1; color:var(--pg-coral); }
.tg-card-h span + span{ margin-left:-5px; color:var(--pg-coral-d); }
.pg .tg-card-n{ padding-right:34px; font-family:'Bricolage Grotesque',sans-serif; font-weight:800; font-size:32px; line-height:1.05; letter-spacing:-.03em; color:var(--pg-ink); overflow-wrap:anywhere; }
.pg a.tg-card-n:hover{ color:var(--pg-coral-d); }
.tg-card-d{ font-size:13.5px; font-weight:600; color:var(--pg-text2); }
.tg-card-st{ display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 0; padding:0; list-style:none; }
.tg-card-st li{ border-radius:999px; background:rgba(255,255,255,.75); padding:4px 10px; font-size:12.5px; line-height:1.4; color:var(--pg-text2); white-space:nowrap; }
.tg-card-st b{ color:var(--pg-ink); font-weight:700; }
.tg-card-st li.is-common{ background:var(--pg-coral-d); color:#ffe1da; }
.tg-card-st li.is-common b{ color:#fff; }
.tg-card-by{ display:flex; align-items:center; gap:8px; margin-top:auto; padding-top:8px; font-size:12.5px; color:var(--pg-muted); overflow-wrap:anywhere; }
.du-pair-xs .du-av{ width:24px; height:24px; font-size:11px; border-width:2px; box-shadow:none; }
.du-pair-xs .du-av + .du-av{ margin-left:-7px; }
.tg-cta{ align-items:flex-start; }
.pg .tg-cta .du-match-h{ margin:0; font-size:30px; }
@media (max-width:640px){
	.tg-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
	.tg-card{ padding:16px 14px 14px; border-radius:20px; }
	.pg .tg-card-n{ padding-right:26px; font-size:25px; }
	.tg-card-st li{ white-space:normal; }
}
@media (max-width:360px){ .tg-grid{ grid-template-columns:minmax(0,1fr); } }
