/* Com Bataillon : page L'équipe (portraits générés par page-equipe.js). */

/* ---------- Héro : pastilles de groupe + interrupteur ---------- */
.elementor .cb-groups-nav>.cb-gsticker:nth-child(1){--r:-2deg}
.elementor .cb-groups-nav>.cb-gsticker:nth-child(2){--r:1.5deg}
.elementor .cb-groups-nav>.cb-gsticker:nth-child(3){--r:-1deg}
.elementor .cb-gsticker{transform:rotate(var(--r,0deg));transition:transform .35s cubic-bezier(.3,1.6,.5,1),box-shadow .25s}
.elementor .cb-gsticker:hover{transform:rotate(0) translateY(-4px);box-shadow:8px 9px 0 var(--cb-encre)}
.elementor .cb-switch-track{transition:background .3s}
.elementor .cb-switch-track::after{content:"";position:absolute;top:3px;left:3px;width:26px;height:26px;border-radius:50%;background:var(--cb-magenta);transition:transform .4s cubic-bezier(.3,1.6,.5,1),background .3s}
.elementor .cb-switch[aria-pressed="true"] .cb-switch-track{background:var(--cb-jaune)}
.elementor .cb-switch[aria-pressed="true"] .cb-switch-track::after{transform:translateX(28px);background:var(--cb-encre)}

/* ---------- Groupes ---------- */
.elementor .cb-group>.cb-wrap{position:relative;z-index:1}
.cb-gdeco{position:absolute;pointer-events:none;z-index:0;opacity:.9}
.elementor .cb-group .cb-group-head .cb-h2 span{display:inline-block;padding:0 .18em;background:var(--gc);color:var(--gt);border-radius:.18em;transform:rotate(-2deg)}
.elementor .cb-g-studio .cb-crew{padding-top:min(10vw,140px)}
@media (min-width:861px){.elementor .cb-g-commercial .cb-crew.cb-crew{grid-template-columns:repeat(2,minmax(0,1fr));max-width:66%;margin-left:auto;margin-right:auto}}
@media (max-width:860px){.elementor .cb-crew.cb-crew{grid-template-columns:repeat(2,minmax(0,1fr))}.cb-crew .cb-mate:last-child:nth-child(odd){grid-column:1/-1;width:50%;justify-self:center}}
@media (max-width:600px){.elementor .cb-crew.cb-crew{gap:18px 12px}.cb-mate .cb-mate-name{font-size:28px;margin-top:8px}.cb-mate .cb-mate-role{font-size:12px}.cb-bubble{font-size:15px;padding:5px 9px 4px}.cb-mfx-zig,.cb-mfx-squig,.cb-mfx-reg{display:none}.cb-mfx-star{width:28px}.cb-mfx-plus{width:18px}.cb-mfx-tri{width:20px}}
.elementor-editor-active .cb-crew:empty::before{content:"Portraits générés automatiquement (liste ÉQUIPE dans page-equipe.js)";grid-column:1/-1;text-align:center;font-family:var(--cb-font-main);font-size:22px;color:var(--cb-muted);padding:40px 0}

/* ---------- Portraits ---------- */
.cb-mate{position:relative;z-index:1;cursor:pointer;background:none;border:0;padding:0;font:inherit;line-height:1.55;color:inherit;text-align:center;white-space:normal}
.cb-mate:hover,.cb-mate:focus{background:none;color:inherit}
.cb-mate.cb-mate-manon{z-index:0}
.cb-stage{display:block;position:relative;aspect-ratio:4/5;max-width:100%;clip-path:inset(-40% -40% 0 -40%)}
.cb-shape{position:absolute;inset:14% 6% 0;background:var(--c);border-radius:42% 58% 63% 37%/41% 44% 56% 59%;animation:cbMorph 9s ease-in-out infinite;transition:background .5s,transform .7s cubic-bezier(.3,1.4,.5,1)}
.cb-mate:nth-child(2) .cb-shape{animation-delay:-3s}.cb-mate:nth-child(3) .cb-shape{animation-delay:-6s}
@keyframes cbMorph{0%,100%{border-radius:42% 58% 63% 37%/41% 44% 56% 59%}33%{border-radius:58% 42% 38% 62%/52% 61% 39% 48%}66%{border-radius:38% 62% 55% 45%/62% 38% 62% 38%}}
.cb-mring{position:absolute;inset:8% 0 -6%;border:3px dashed var(--c2);border-radius:50%;opacity:0;transform:scale(.7) rotate(0);transition:opacity .4s,transform .9s cubic-bezier(.3,1.4,.5,1)}
.cb-pic{position:absolute;left:50%;bottom:0;width:88%;height:94%;transform:translateX(-50%);transition:transform .7s cubic-bezier(.3,1.5,.5,1)}
.cb-pic img,.cb-pic svg{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:contain;object-position:bottom center}
.cb-pic.is-work{transform:translate(-50%,112%) rotate(14deg)}
.cb-dot{position:absolute;width:var(--s);height:var(--s);border-radius:50%;background:var(--dc);left:var(--x);top:var(--y);transform:scale(0);transition:transform .5s cubic-bezier(.3,1.8,.5,1)}
.cb-mate .cb-dot:nth-of-type(2){transition-delay:.08s}.cb-mate .cb-dot:nth-of-type(3){transition-delay:.16s}
.cb-bubble{position:absolute;top:6%;right:2%;z-index:3;background:#fff;color:var(--cb-encre);border:2px solid var(--cb-encre);font-family:var(--cb-font-main);font-weight:700;font-size:21px;line-height:1;padding:8px 14px 6px;border-radius:16px 16px 16px 4px;box-shadow:3px 3px 0 var(--cb-encre);transform:scale(0) rotate(-8deg);transform-origin:0 100%;transition:transform .45s cubic-bezier(.3,1.8,.5,1);white-space:nowrap}
.cb-bubble.left{right:auto;left:2%;border-radius:16px 16px 4px 16px;transform-origin:100% 100%;transform:scale(0) rotate(8deg)}
.cb-mate.on .cb-pic.is-base,.cb-mate.hv .cb-pic.is-base{transform:translate(-50%,112%) rotate(-14deg)}
.cb-mate.on .cb-pic.is-work,.cb-mate.hv .cb-pic.is-work{transform:translate(-50%,0) rotate(0)}
.cb-mate.on .cb-shape,.cb-mate.hv .cb-shape{background:var(--c2);transform:scale(1.07) rotate(-7deg)}
.cb-mate.on .cb-mring,.cb-mate.hv .cb-mring{opacity:1;transform:scale(1) rotate(30deg)}
.cb-mate.on .cb-dot,.cb-mate.hv .cb-dot{transform:scale(1)}
.cb-mate.on .cb-bubble,.cb-mate.hv .cb-bubble{transform:scale(1) rotate(-6deg)}
.cb-mate.on .cb-bubble.left,.cb-mate.hv .cb-bubble.left{transform:scale(1) rotate(6deg)}
.cb-mate .cb-mate-name{display:block;font-family:var(--cb-font-main);font-weight:700;font-size:clamp(34px,3.4vw,44px);line-height:1;margin-top:14px}
.cb-mate .cb-mate-role{display:block;font-weight:600;font-size:14px;color:var(--cb-muted);margin-top:4px}
.cb-mate:focus-visible{outline:3px solid var(--cb-magenta);outline-offset:6px;border-radius:20px}
.cb-rays{position:absolute;left:50%;top:52%;width:120%;transform:translate(-50%,-50%) scale(.4) rotate(0);opacity:0;transition:opacity .4s,transform 1s cubic-bezier(.3,1.3,.5,1)}
.cb-mate.on .cb-rays,.cb-mate.hv .cb-rays{opacity:.55;transform:translate(-50%,-50%) scale(1) rotate(25deg)}
.cb-mfx{position:absolute;z-index:2;transition:transform .7s cubic-bezier(.3,1.7,.5,1);animation:cbFloatyM 5s ease-in-out infinite}
.cb-mfx-star{width:46px;left:-2%;top:18%;--t:translate(-26px,-30px) rotate(-40deg) scale(1.5)}
.cb-mfx-zig{width:74px;right:-4%;top:58%;animation-delay:-1s;--t:translate(30px,10px) rotate(-12deg) scale(1.35)}
.cb-mfx-plus{width:26px;right:14%;top:2%;animation-delay:-2s;--t:translate(18px,-26px) rotate(90deg) scale(1.6)}
.cb-mfx-reg{width:30px;left:6%;bottom:16%;animation-delay:-3s;--t:translate(-26px,14px) rotate(180deg) scale(1.5)}
.cb-mfx-tri{width:30px;left:30%;top:0;animation-delay:-1.5s;--t:translate(-10px,-34px) rotate(-60deg) scale(1.5)}
.cb-mfx-squig{width:40px;right:2%;bottom:6%;animation-delay:-2.5s;--t:translate(24px,16px) rotate(30deg) scale(1.4)}
@keyframes cbFloatyM{50%{translate:0 -8px;rotate:8deg}}
.cb-mate.on .cb-mfx,.cb-mate.hv .cb-mfx{transform:var(--t)}
.cb-g-studio .cb-mfx-zig path{stroke:var(--cb-jaune)}

/* Réglages photo par personne (travail à la même échelle que le portrait, mesuré sur la tête) */
.cb-mate-manon .cb-pic.is-work{width:300%;height:calc(94% * 1.37)}
.cb-mate-emilie .cb-pic.is-work{width:300%}
.cb-mate-patrick .cb-pic.is-base{width:300%}
.cb-mate-antonin .cb-pic.is-work{width:300%;height:calc(94% * .99)}
.cb-mate-stephane .cb-pic.is-work{width:300%;height:calc(94% * .985)}
.cb-mate-rafour .cb-pic.is-work{width:300%;height:calc(94% * 1.12)}
.cb-mate-patrick .cb-pic.is-work{width:300%;height:calc(94% * 1.06);left:40%}
.cb-mate-bernard .cb-pic.is-work{width:300%;height:calc(94% * 1.005)}
.cb-mate-manon .cb-bubble{top:auto;bottom:30%;right:-2%}
.cb-mate-manon.on .cb-mfx-tri,.cb-mate-manon.on .cb-mfx-plus,.cb-mate-manon.hv .cb-mfx-tri,.cb-mate-manon.hv .cb-mfx-plus{opacity:0}

/* Tablette et mobile (Manon passe sous les autres, en grand) */
@media (min-width:601px) and (max-width:860px){.cb-mate-manon{order:3}.elementor .cb-g-studio .cb-crew .cb-mate-manon{grid-column:1/-1;width:50%;justify-self:center;margin-top:min(14vw,120px)}.elementor .cb-g-studio .cb-crew .cb-mate:last-child:nth-child(odd){grid-column:auto;width:auto;justify-self:stretch}}
@media (max-width:600px){.elementor .cb-crew.cb-crew{grid-template-columns:minmax(0,1fr);max-width:260px;margin-left:auto;margin-right:auto;gap:34px}.cb-crew .cb-mate:last-child:nth-child(odd){width:auto}.elementor .cb-g-studio .cb-crew{padding-top:40px}.cb-mate.cb-mate-manon{margin-top:70px}.cb-mate .cb-mate-name{font-size:36px}.cb-mate .cb-mate-role{font-size:14px}.cb-bubble{font-size:19px;padding:7px 12px 5px}}

@media (prefers-reduced-motion:reduce){.cb-shape,.cb-mfx{animation:none}}
