/* Page contact : carte en relief qui suit le curseur, champs « magnétiques » avec lumière tournante,
   messages d'aide en direct, compteur circulaire, bouton qui se transforme et avion en papier à l'envoi (voir contact.js). */
.ct-main{--ct-accent:#90dff2;--ct-blue:#278ca5;--ct-deep:#114855;--ct-gold:#f2c14e;--ct-err:#ff8a80;--ct-card:#1d1b19;--ct-field:#161514;--ct-line:#ffffff1f;--ct-muted:#a4a09d}
.ct-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,520px);gap:56px;align-items:start}
.ct-side h2{margin:0 0 14px;font:700 1.35rem 'Barlow Condensed',sans-serif;letter-spacing:.02em;color:#fff}
.ct-side ul{margin:0;padding:0;list-style:none;display:grid;gap:14px}
.ct-side li{position:relative;padding-left:18px;color:#d5d3d1;line-height:1.55}
.ct-side li::before{content:"";position:absolute;left:0;top:.62em;width:7px;height:7px;border-radius:2px;background:var(--ct-blue);transform:rotate(45deg)}
.ct-side b{color:#fff}
.ct-side a,.ct-alt a{color:var(--ct-accent)}
.ct-alt{margin:22px 0 0;color:var(--ct-muted)}

/* Carte */
.ct-stage{position:relative;perspective:1100px}
.ct-aura{display:none}
@keyframes ctAura{50%{opacity:.48;transform:scale(1.03)}}
.ct-card{--rx:0deg;--ry:0deg;position:relative;padding:24px;border:1px solid var(--ct-line);border-radius:22px;background:var(--ct-card);color:#f0efee;transform:rotateX(var(--rx)) rotateY(var(--ry));transition:transform .5s cubic-bezier(.2,.8,.2,1);box-shadow:0 18px 40px -24px #00000080;animation:ctIn .6s cubic-bezier(.2,.9,.3,1.15) both}
@keyframes ctIn{from{opacity:0;transform:translateY(24px)}}
.ct-depth{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none}
.ct-blob{position:absolute;width:190px;height:190px;border-radius:50%;filter:blur(48px)}
.ct-blob.a{left:-50px;top:-64px;background:#278ca545;transform:translate(var(--ax,0px),var(--ay,0px))}
.ct-blob.b{right:-40px;bottom:-80px;background:#90dff226;transform:translate(var(--bx,0px),var(--by,0px))}
.ct-light{position:absolute;inset:0;background:radial-gradient(240px circle at var(--px,-300px) var(--py,-300px),#278ca533,transparent 70%)}
.ct-head{position:relative;margin-bottom:16px}
.ct-head h2{margin:0;font:800 1.7rem/1.1 'Barlow Condensed',sans-serif;letter-spacing:.01em;color:#fff}
.ct-head p{margin:6px 0 0;color:var(--ct-muted);font-size:.95rem}

/* Sujets */
.ct-subjects{position:relative;display:flex;flex-wrap:wrap;gap:6px;margin:0 0 16px;padding:0;border:0;}
.ct-subjects legend{width:100%;margin-bottom:8px;padding:0;font-weight:600;font-size:.9rem;color:#e4e2e1}
.ct-subjects label{position:relative;cursor:pointer}
.ct-subjects input{position:absolute;opacity:0;pointer-events:none}
.ct-subjects label>span{display:inline-block;padding:7px 13px;border-radius:10px;border:1px solid var(--ct-line);background:#ffffff08;color:#c8c6c4;font:600 .86rem Barlow,sans-serif;transition:background .2s,color .2s,border-color .2s,transform .15s}
.ct-subjects label:hover>span{color:#fff;border-color:#ffffff40}
.ct-subjects input:checked+span{background:var(--ct-blue);border-color:var(--ct-blue);color:#fff;box-shadow:0 4px 14px -4px #278ca5aa}
.ct-subjects input:focus-visible+span{outline:2px solid var(--ct-accent);outline-offset:2px}
.ct-subjects label:active>span{transform:scale(.96)}
/* « Le Coup Tordu » garde la couleur du podcast : le jaune. */
.ct-subjects input[value=podcast]+span{color:#f5c542;border-color:#f5c54240}
.ct-subjects label:hover>input[value=podcast]+span{color:#ffe994;border-color:#f5c54280}
.ct-subjects input[value=podcast]:checked+span,.ct-subjects label:hover>input[value=podcast]:checked+span{background:#f5c542;border-color:#f5c542;color:#1a1505;box-shadow:0 4px 14px -4px #f5c542aa}
.ct-subjects input[value=podcast]:focus-visible+span{outline-color:#f5c542}

/* Champs */
.ct-fields{position:relative;display:grid;gap:10px;}
.ct-field>label{display:block;margin-bottom:6px;font-weight:600;font-size:.9rem;color:#e4e2e1}
.ct-shell{position:relative;padding:1.5px;border-radius:13px;background:var(--ct-line);transition:background .25s,transform .12s linear;will-change:transform}
.ct-field[data-tone=ok] .ct-shell{background:#278ca580}
.ct-field[data-tone=error] .ct-shell{background:#ff6b6bb3}
.ct-spin{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity .25s}
.ct-spin::before{content:"";position:absolute;left:50%;top:50%;width:260%;aspect-ratio:1;translate:-50% -50%;background:conic-gradient(from 0deg,transparent 0 55%,#1e86a0 70%,var(--ct-blue) 82%,var(--ct-deep) 94%,transparent);animation:ctSpin 2.4s linear infinite}
@keyframes ctSpin{to{rotate:360deg}}
.ct-shell:focus-within .ct-spin{opacity:1}
.ct-in{position:relative;border-radius:11.5px;background:var(--ct-field);transition:box-shadow .25s}
.ct-shell:focus-within .ct-in{box-shadow:0 0 24px -4px #278ca58c}
.ct-in input,.ct-in textarea{display:block;width:100%;min-height:46px;margin:0;padding:11px 13px;border:0;border-radius:11.5px;background:transparent;color:#fff;font:500 1rem/1.45 Barlow,system-ui,sans-serif;outline:none;box-shadow:none;box-sizing:border-box}
.ct-in textarea{resize:none;padding-bottom:40px;min-height:150px}
.ct-in ::placeholder{color:#86817c}
.ct-in input:disabled,.ct-in textarea:disabled{opacity:.6}
.ct-msg{position:relative;height:20px;margin-top:5px;overflow:hidden;font-size:.8rem}
.ct-msg p{position:absolute;inset:0;display:flex;align-items:center;gap:6px;margin:0;white-space:nowrap;color:var(--ct-muted);animation:ctMsgIn .16s ease-out both}
.ct-msg p.out{animation:ctMsgOut .16s ease-in both}
@keyframes ctMsgIn{from{opacity:0;transform:translateY(10px)}}
@keyframes ctMsgOut{to{opacity:0;transform:translateY(-10px)}}
.ct-msg p[data-tone=ok]{color:var(--ct-accent)}
.ct-msg p[data-tone=error]{color:var(--ct-err)}
.ct-msg svg{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.ct-msg svg path{stroke-dasharray:24;stroke-dashoffset:24;animation:ctDraw .3s ease-out forwards}
@keyframes ctDraw{to{stroke-dashoffset:0}}

/* Compteur circulaire */
.ct-ring{position:absolute;right:10px;bottom:9px;display:flex;align-items:center;gap:7px;color:var(--ct-muted);pointer-events:none;transition:color .2s}
.ct-ring svg{width:28px;height:28px;rotate:-90deg;overflow:visible;transition:filter .3s}
.ct-ring circle{fill:none;stroke-width:3}
.ct-ring .bg{stroke:#ffffff1f}
.ct-ring .fg{stroke:currentColor;stroke-linecap:round;stroke-dasharray:69.115;stroke-dashoffset:69.115;transition:stroke-dashoffset .5s cubic-bezier(.34,1.56,.64,1)}
.ct-ring .ct-left{font:600 .76rem Barlow,sans-serif;font-variant-numeric:tabular-nums;opacity:0;transform:translateX(6px);transition:opacity .2s,transform .2s}
.ct-ring.low .ct-left{opacity:1;transform:none}
.ct-ring.enough{color:var(--ct-accent)}.ct-ring.enough svg{filter:drop-shadow(0 0 5px currentColor)}
.ct-ring.low{color:var(--ct-gold)}.ct-ring.over{color:var(--ct-err)}
.ct-ring.pop svg{animation:ctPop .4s ease-out}
@keyframes ctPop{40%{transform:scale(1.35)}}

/* Piège à robots et vérification */
.ct-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.ct-turnstile:not(:empty){margin-top:14px}

/* Bouton d'envoi */
.ct-send{position:relative;margin-top:14px;}
.ct-shake{position:relative;display:flex;justify-content:center;min-height:56px}
.ct-shake.go{animation:ctShake .4s}
@keyframes ctShake{20%{transform:translateX(-9px)}40%{transform:translateX(9px)}60%{transform:translateX(-6px)}80%{transform:translateX(6px)}}
.ct-btn{position:relative;display:grid;place-items:center;width:100%;height:56px;padding:0;border:0;border-radius:14px;color:#fff;font:700 1rem Barlow,sans-serif;letter-spacing:.02em;cursor:pointer;overflow:visible;
  background:linear-gradient(110deg,#0b343f 0%,#216070 30%,#22a7c9 50%,#216070 70%,#0b343f 100%);background-size:250% 100%;animation:ctFlow 5s linear infinite;
  box-shadow:0 12px 30px -8px #216070c0,inset 0 1px 0 #ffffff40;transition:width .55s cubic-bezier(.34,1.56,.64,1),transform .15s,background-color .2s}
@keyframes ctFlow{to{background-position:-250% 0}}
.ct-btn:hover:not(:disabled){transform:translateY(-2px)}
.ct-btn:active:not(:disabled){transform:scale(.97)}
.ct-btn:focus-visible{outline:2px solid var(--ct-accent);outline-offset:4px}
.ct-btn:disabled{cursor:wait}
.ct-label{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;animation:ctMsgIn .25s cubic-bezier(.34,1.56,.64,1) both}
.ct-label svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.ct-btn.round{border-radius:50%}
.ct-btn.round .ct-label{display:none}
.ct-ok{position:absolute;width:28px;height:28px;fill:none;stroke:#fff;stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round;opacity:0}
.ct-ok path{stroke-dasharray:20;stroke-dashoffset:20}
.ct-btn.sent .ct-ok{opacity:1;animation:ctOk .35s cubic-bezier(.34,1.56,.64,1)}
.ct-btn.sent .ct-ok path{animation:ctDraw .45s .1s ease-out forwards}
@keyframes ctOk{from{transform:scale(.4);opacity:0}}
.ct-btn.error{background:#c62828;animation:none;box-shadow:0 12px 30px -8px #c6282899}
.ct-ripple{position:absolute;left:50%;top:50%;width:56px;height:56px;margin:-28px 0 0 -28px;border:2px solid var(--ct-accent);border-radius:50%;pointer-events:none;animation:ctRipple .9s ease-out forwards}
@keyframes ctRipple{from{opacity:.7}to{transform:scale(2.5);opacity:0}}
.ct-plane{position:absolute;left:50%;top:50%;z-index:2;width:32px;height:32px;margin:-16px 0 0 -16px;opacity:0;pointer-events:none}
.ct-plane svg{width:100%;height:100%;fill:#fff;stroke:var(--ct-deep);stroke-width:1.5;stroke-linejoin:round;filter:drop-shadow(0 0 8px #90dff2)}
.ct-send.sending .ct-plane{opacity:1;animation:ctWobble .9s ease-in-out infinite}
@keyframes ctWobble{0%,100%{transform:rotate(-8deg)}50%{transform:rotate(6deg) translateY(-3px)}}
.ct-dot{position:absolute;left:50%;top:50%;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;opacity:0;pointer-events:none;filter:blur(1px)}
.ct-status{position:relative;min-height:20px;margin:10px 0 0;text-align:center;font-size:.85rem;color:var(--ct-muted)}
.ct-status.error{color:var(--ct-err)}

/* Thème clair */
html[data-theme="light"] .ct-main{--ct-card:#ffffff;--ct-field:#f8f8f7;--ct-line:#1816141f;--ct-muted:#6e6a66;--ct-accent:#124a58;--ct-err:#c62828}
html[data-theme="light"] .ct-side h2,html[data-theme="light"] .ct-side b,html[data-theme="light"] .ct-head h2{color:#0f0f0f}
html[data-theme="light"] .ct-side li{color:#44403c}
html[data-theme="light"] .ct-card{color:#181614;box-shadow:0 18px 40px -24px #17202233}
html[data-theme="light"] .ct-field>label,html[data-theme="light"] .ct-subjects legend{color:#33302d}
html[data-theme="light"] .ct-in input,html[data-theme="light"] .ct-in textarea{color:#181614}
html[data-theme="light"] .ct-subjects label>span{background:#18161406;color:#44403c}
html[data-theme="light"] .ct-subjects input:checked+span{color:#fff;background:#226474;border-color:#226474}
html[data-theme="light"] .ct-ring .bg{stroke:#1816141f}
html[data-theme="light"] .ct-ring.low{color:#a06a00}

@media(max-width:900px){.ct-layout{grid-template-columns:1fr;gap:36px}.ct-stage{order:-1}}
@media(max-width:600px){.ct-card{padding:18px}.ct-head h2{font-size:1.5rem}}
@media(prefers-reduced-motion:reduce){.ct-aura,.ct-card,.ct-btn,.ct-spin::before,.ct-send.sending .ct-plane{animation:none}.ct-card{transform:none}.ct-btn{transition:none}.ct-msg p,.ct-msg p.out{animation-duration:.01s}}

/* Pendant la saisie, la carte se remet à plat : le texte reste parfaitement net. */
.ct-card:focus-within{transform:none}
html[data-theme="light"] .ct-subjects input[value=podcast]+span{color:#8a6500;border-color:#ac7e0055}
html[data-theme="light"] .ct-subjects input[value=podcast]:checked+span{background:#f5c542;border-color:#d9a400;color:#1a1505}
