/* Panneau latéral « En savoir plus » des pages catégorie (04/12/2026). */

/* En-tête : début de l'intro + bouton. */
.co-intro-row { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; }
.co-intro-row .co-intro-lead { flex:1 1 auto; min-width:0; margin:0; }
.co-intro-open { flex:none; display:inline-flex; align-items:center; gap:10px; min-height:32px; margin:0 0 0 auto; padding:0 0 3px; border:0; border-bottom:1px solid currentColor; border-radius:0; background:transparent; color:#1e1e1e; font:500 16px/24px Figtree,sans-serif; letter-spacing:-.32px; white-space:nowrap; cursor:pointer; }
.co-intro-open svg { display:block; flex:none; }
.co-intro-open:hover,.co-intro-open[aria-expanded=true] { color:#377770; }
.co-intro-open:focus-visible { outline:2px solid #1f3a5f; outline-offset:4px; border-radius:4px; }
@media(max-width:767px) {
    /* 05/12/2026 : « En savoir plus » au bout de la dernière ligne de l'intro, pour remonter la grille. */
    .co-intro-row { display:block; }
    .co-intro-row .co-intro-lead { display:inline; margin:0; }
    .co-intro-open { position:relative; display:inline-flex; gap:6px; min-height:0; margin:0; padding:0; border-bottom:0; vertical-align:baseline; line-height:24px; text-decoration:underline; text-underline-offset:4px; }
    .co-intro-open::after { content:""; position:absolute; inset:-10px -8px; } /* zone tactile d'environ 44 px */
    .co-intro-open svg { align-self:center; }
    .co-intro-extra { display:none; }
    .co-intro-ellipsis { display:inline; }
}

.co-intro-ellipsis { display:none; }

/* Tiroir. Le <dialog> est le panneau ; son ::backdrop est le fond cliquable. */
.co-cat-drawer { position:fixed; inset:0 0 0 auto; width:min(560px,100vw); max-width:100vw; height:100%; max-height:100%; margin:0; padding:0; border:0; border-radius:16px 0 0 16px; background:#fff; color:#1e1e1e; box-shadow:-16px 0 48px #10243d2e; overflow:hidden; font:400 16px/1.6 Figtree,sans-serif; }
.co-cat-drawer:not([open]) { display:none; }
.co-cat-drawer::backdrop { background:#10243d88; }
.co-cat-drawer * { box-sizing:border-box; }
.co-cat-drawer-panel { display:flex; flex-direction:column; height:100%; }
.co-cat-drawer-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:28px 32px 20px; border-bottom:1px solid #1e1e1e1f; }
.co-cat-drawer .co-cat-drawer-kicker { margin:0 0 6px; color:#377770; font:700 12px/1.2 Figtree,sans-serif; letter-spacing:.08em; text-transform:uppercase; }
.co-cat-drawer .co-cat-drawer-title { margin:0; color:#1f3a5f; font:700 26px/1.2 Manrope,sans-serif; letter-spacing:-.4px; }
.co-cat-drawer-close { flex:none; display:grid; place-items:center; width:44px; height:44px; margin:-6px -10px 0 0; padding:0; border:0; border-radius:50%; background:transparent; color:#1f3a5f; cursor:pointer; }
.co-cat-drawer-close:hover { background:#e6f2f0; color:#377770; }
.co-cat-drawer-close:focus-visible { outline:2px solid #1f3a5f; outline-offset:2px; }
.co-cat-drawer-body { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:24px 32px 36px; -webkit-overflow-scrolling:touch; }
.co-cat-drawer-body:focus { outline:none; }
.co-cat-drawer-foot { padding:16px 32px calc(16px + env(safe-area-inset-bottom)); border-top:1px solid #1e1e1e1f; background:#fff; }
.co-cat-drawer-cta { display:block; width:100%; min-height:52px; padding:12px 16px; border:0; border-radius:10px; background:#1f3a5f; color:#fff; font:700 15px/1.2 Figtree,sans-serif; letter-spacing:.3px; cursor:pointer; }
.co-cat-drawer-cta:hover { background:#315276; }
.co-cat-drawer-cta:focus-visible { outline:2px solid #1f3a5f; outline-offset:3px; }

/* Texte du tiroir. */
.co-cat-drawer-body p { margin:0 0 14px; }
.co-cat-drawer-intro { margin-bottom:8px; color:#1e1e1e; font-size:17px; line-height:1.65; }
.co-cat-drawer-intro + .co-cat-drawer-text { margin-top:8px; padding-top:8px; border-top:1px solid #1e1e1e14; }
.co-cat-drawer-text h2 { margin:28px 0 10px; padding:0; color:#1f3a5f; font:700 20px/1.3 Manrope,sans-serif; letter-spacing:-.2px; }
.co-cat-drawer-text h3 { margin:22px 0 6px; padding:0; color:#1e1e1e; font:600 17px/1.35 Manrope,sans-serif; }
.co-cat-drawer-text h2:first-child,.co-cat-drawer-text h3:first-child { margin-top:16px; }
.co-cat-drawer-body a { color:#377770; font-weight:600; text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; }
.co-cat-drawer-body a:hover { color:#1f3a5f; }
.co-cat-drawer-body a:focus-visible { outline:2px solid #1f3a5f; outline-offset:2px; border-radius:3px; }
.co-cat-drawer-body ul,.co-cat-drawer-body ol { margin:0 0 16px; padding:0; list-style:none; }
.co-cat-drawer-body li { position:relative; margin:0 0 8px; padding-left:22px; }
.co-cat-drawer-body ul li::before { content:""; position:absolute; left:4px; top:.62em; width:7px; height:7px; border-radius:50%; background:#377770; }
.co-cat-drawer-body ol { counter-reset:co-step; }
.co-cat-drawer-body ol li { counter-increment:co-step; padding-left:30px; }
.co-cat-drawer-body ol li::before { content:counter(co-step); position:absolute; left:0; top:.1em; display:grid; place-items:center; width:22px; height:22px; border-radius:50%; background:#e6f2f0; color:#1f3a5f; font:700 12px/1 Figtree,sans-serif; }
.co-cat-drawer-body strong { font-weight:600; color:#1f3a5f; }
.co-cat-drawer-text .co-cat-faq { margin-top:8px; }
.co-cat-drawer-text .co-cat-faq h3 { margin:0; padding:14px 16px 4px; border-radius:12px 12px 0 0; background:#f0f1f0; }
.co-cat-drawer-text .co-cat-faq h3 + p { margin:0 0 12px; padding:0 16px 14px; border-radius:0 0 12px 12px; background:#f0f1f0; }

@media(max-width:767px) {
    .co-cat-drawer { width:100vw; border-radius:0; box-shadow:none; }
    .co-cat-drawer-head { padding:18px 20px 14px; }
    .co-cat-drawer .co-cat-drawer-title { font-size:24px; }
    .co-cat-drawer-close { margin:-4px -8px 0 0; }
    .co-cat-drawer-body { padding:18px 20px 28px; }
    .co-cat-drawer-foot { padding:12px 20px calc(12px + env(safe-area-inset-bottom)); }
    .co-cat-drawer-intro { font-size:16px; }
}

/* La page ne défile plus derrière le tiroir ouvert. */
html.co-cat-drawer-lock { overflow:hidden; scrollbar-gutter:auto; }
html.co-cat-drawer-lock body { padding-right:var(--co-scrollbar,0px); }

@media(prefers-reduced-motion:no-preference) {
    .co-cat-drawer[open] { animation:co-cat-drawer-in .32s cubic-bezier(.22,.8,.3,1); }
    .co-cat-drawer[open]::backdrop { animation:co-cat-drawer-fade .32s ease; }
    .co-cat-drawer.is-closing { animation:co-cat-drawer-out .22s ease-in forwards; }
    .co-cat-drawer.is-closing::backdrop { animation:co-cat-drawer-fade .22s ease-in reverse forwards; }
    .co-intro-open,.co-cat-drawer-close,.co-cat-drawer-cta { transition:color .18s ease,background-color .18s ease; }
}
@keyframes co-cat-drawer-in { from { transform:translateX(100%); } to { transform:none; } }
@keyframes co-cat-drawer-out { from { transform:none; } to { transform:translateX(100%); } }
@keyframes co-cat-drawer-fade { from { opacity:0; } to { opacity:1; } }
