/* ==========================================================
   IdeoBox - Dark glass theme (inspire de BookMaster / Quizzier)
   Violet / cyan / magenta - Glass cards - Neon glow - Mesh BG
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    --c-primary: #a78bfa;
    --c-primary-dark: #8b5cf6;
    --c-primary-deep: #7c3aed;
    --c-accent: #22d3ee;
    --c-accent-2: #f472b6;
    --c-bg: #0a0a1a;
    --c-bg-elev: #11112a;
    --c-card: rgba(30, 30, 60, 0.55);
    --c-card-solid: #1a1a35;
    --c-text: #f0f4ff;
    --c-text-strong: #ffffff;
    --c-muted: #9ca3b5;
    --c-border: rgba(167, 139, 250, 0.18);
    --c-border-strong: rgba(167, 139, 250, 0.35);
    --c-success: #4ade80;
    --c-error: #f87171;
    --c-info: #60a5fa;
    --c-warn: #fbbf24;
    --font-heading: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --radius: 18px;
    --radius-lg: 24px;
    --radius-sm: 12px;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.5);
    --blur: blur(22px);
    --header-h: 60px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; min-height: 100vh; }
body {
    font-family: var(--font-body);
    background: var(--c-bg);
    color: var(--c-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* Mesh gradient anime en fond */
body::before {
    content: '';
    position: fixed; inset: -20%; z-index: -2;
    background:
        radial-gradient(circle at 15% 20%, rgba(167, 139, 250, 0.30) 0%, transparent 35%),
        radial-gradient(circle at 85% 30%, rgba(244, 114, 182, 0.25) 0%, transparent 35%),
        radial-gradient(circle at 50% 80%, rgba(34, 211, 238, 0.22) 0%, transparent 40%),
        radial-gradient(circle at 20% 70%, rgba(139, 92, 246, 0.22) 0%, transparent 35%);
    animation: meshDrift 28s ease-in-out infinite alternate;
    pointer-events: none;
    filter: blur(40px);
}
body::after {
    content: '';
    position: fixed; inset: 0; z-index: -1;
    background:
        linear-gradient(rgba(167,139,250,.04) 1px, transparent 1px) 0 0 / 60px 60px,
        linear-gradient(90deg, rgba(167,139,250,.04) 1px, transparent 1px) 0 0 / 60px 60px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
@keyframes meshDrift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-3%, 2%) scale(1.08); }
    100% { transform: translate(2%, -3%) scale(1); }
}

a { color: var(--c-primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--c-accent); }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.15;
    margin-top: 0;
    letter-spacing: -0.02em;
    color: var(--c-text-strong);
}
h1 { font-size: 2.2rem; margin-bottom: 1.2rem; }
h2 { font-size: 1.5rem; margin-bottom: .8rem; }
h3 { font-size: 1.2rem; }

/* ---------- Header ---------- */
.ib-header {
    background: rgba(10, 10, 26, 0.75);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--c-border);
    position: sticky; top: 0; z-index: 50;
}
.ib-header .ib-container {
    max-width: 1200px; margin: 0 auto; padding: .9rem 1.4rem;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.ib-brand {
    font-family: var(--font-heading); font-weight: 700; font-size: 1.4rem;
    color: var(--c-text-strong); display: flex; align-items: center; gap: .55rem;
    text-decoration: none;
}
.ib-brand::after {
    content: ''; display: inline-block; width: 10px; height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent-2));
    box-shadow: 0 0 14px var(--c-primary), 0 0 28px var(--c-accent-2);
    animation: brandPulse 2.2s ease-in-out infinite;
}
@keyframes brandPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.65; transform: scale(0.85); }
}
.ib-header nav { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.ib-header nav a {
    color: var(--c-text); font-weight: 500; font-size: .95rem;
    padding: .35rem .2rem; position: relative; text-decoration: none;
}
.ib-header nav a::after {
    content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--c-primary), var(--c-accent-2));
    transform: scaleX(0); transform-origin: left; transition: transform .25s;
    border-radius: 2px;
}
.ib-header nav a:hover { color: var(--c-text-strong); }
.ib-header nav a:hover::after { transform: scaleX(1); }
.ib-user { color: var(--c-muted); }

/* Cloche de notifications */
.ib-bell { position: relative; display: inline-flex; align-items: center; }
.ib-bell::after { display: none; }
.ib-bell-badge {
    position: absolute; top: -6px; right: -8px;
    min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #f472b6);
    color: #fff; font-size: .7rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 10px rgba(244, 114, 182, .6);
}
.ib-bell-badge[hidden] { display: none; }

/* ---------- Layout ---------- */
.ib-container { max-width: 1200px; margin: 0 auto; padding: 1.5em 1.4rem 4rem; }
main.ib-container { padding-top: 2.2em; }

/* ---------- Footer ---------- */
.ib-footer {
    border-top: 1px solid var(--c-border);
    margin-top: 4rem;
    padding: 1.5rem 0;
    text-align: center;
    color: var(--c-muted);
    background: rgba(10, 10, 26, 0.5);
}

/* ---------- Cards (glass) ---------- */
.ib-card {
    background: var(--c-card);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.6rem;
    margin-bottom: 1.2rem;
    box-shadow: var(--shadow);
    transition: border-color .2s, transform .15s;
}
.ib-card:hover { border-color: var(--c-border-strong); }

.ib-grid { display: grid; gap: 1.2rem; }
.ib-grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.ib-grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.ib-muted { color: var(--c-muted); font-size: .9em; }
.ib-row { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.ib-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ib-spacer { flex: 1; }

/* ---------- Flash ---------- */
.ib-flash {
    padding: .9rem 1.2rem;
    border-radius: var(--radius-sm);
    margin: .8rem 0;
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid;
    animation: slideDown .4s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ib-flash-ok   { background: rgba(74, 222, 128, 0.15); color: #86efac; border-color: rgba(74, 222, 128, 0.3); }
.ib-flash-info { background: rgba(96, 165, 250, 0.15); color: #93c5fd; border-color: rgba(96, 165, 250, 0.3); }
.ib-flash-err  { background: rgba(248, 113, 113, 0.15); color: #fca5a5; border-color: rgba(248, 113, 113, 0.3); }

/* ---------- Forms ---------- */
label {
    display: block;
    margin: .9rem 0 .35rem;
    font-weight: 600;
    font-size: .92rem;
    color: var(--c-text);
}
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=url], input[type=search], select, textarea {
    width: 100%;
    padding: .65rem .85rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    background: rgba(10, 10, 26, 0.5);
    color: var(--c-text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}
textarea { resize: vertical; min-height: 80px; }
input[disabled] { opacity: .5; cursor: not-allowed; }
select option { background: var(--c-card-solid); color: var(--c-text); }

/* ---------- Buttons ---------- */
.ib-btn, button[type=submit], button[type=button] {
    display: inline-block;
    padding: .65rem 1.4rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent-2));
    color: #fff;
    cursor: pointer;
    font-size: .95rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s, opacity .15s;
    box-shadow: 0 8px 24px rgba(167,139,250,.35), inset 0 1px 0 rgba(255,255,255,.15);
}
.ib-btn:hover, button:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(167,139,250,.5); color: #fff; }
.ib-btn:disabled, button:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.ib-btn-ghost {
    background: transparent;
    color: var(--c-primary);
    border: 1px solid var(--c-border-strong);
    box-shadow: none;
}
.ib-btn-ghost:hover { background: rgba(167, 139, 250, 0.1); color: var(--c-text-strong); }
.ib-btn-danger {
    background: linear-gradient(135deg, #ef4444, #f87171);
    box-shadow: 0 8px 24px rgba(248, 113, 113, .35);
}
.ib-btn-danger:hover { box-shadow: 0 12px 32px rgba(248, 113, 113, .5); }
.ib-btn-sm { padding: .35rem .9rem; font-size: .85rem; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; background: transparent; }
th, td { padding: .75rem .9rem; text-align: left; border-bottom: 1px solid var(--c-border); }
th { background: rgba(167, 139, 250, 0.08); font-weight: 600; color: var(--c-text-strong); }
tr:hover td { background: rgba(167, 139, 250, 0.05); }
small { color: var(--c-muted); }

/* ---------- Pills ---------- */
.ib-pill {
    display: inline-block;
    padding: .25rem .8rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    border: 1px solid;
}
.ib-pill-ok   { background: rgba(74, 222, 128, .15); color: #86efac; border-color: rgba(74, 222, 128, .35); }
.ib-pill-warn { background: rgba(251, 191, 36, .15); color: #fcd34d; border-color: rgba(251, 191, 36, .35); }
.ib-pill-err  { background: rgba(248, 113, 113, .15); color: #fca5a5; border-color: rgba(248, 113, 113, .35); }
.ib-pill-info { background: rgba(96, 165, 250, .15); color: #93c5fd; border-color: rgba(96, 165, 250, .35); }
.ib-pill-role { background: rgba(167, 139, 250, .15); color: #c4b5fd; border-color: rgba(167, 139, 250, .35); }

/* ---------- Stats ---------- */
.ib-stat {
    background: var(--c-card);
    backdrop-filter: var(--blur);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.4rem 1rem;
    text-align: center;
    transition: transform .15s, border-color .15s;
}
.ib-stat:hover { transform: translateY(-2px); border-color: var(--c-border-strong); }
.ib-stat-value {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}
.ib-stat-label { color: var(--c-muted); font-size: .88rem; margin-top: .3rem; }

/* ---------- Hero (landing) ---------- */
.ib-hero {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
    overflow: hidden;
    background: rgba(30, 30, 60, 0.45);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--c-border-strong);
    box-shadow: var(--shadow-lg), 0 0 80px rgba(167,139,250,.2);
}
.ib-hero::before {
    content: ''; position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(167,139,250,.4), transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(244,114,182,.35), transparent 50%);
    animation: heroDrift 14s ease-in-out infinite alternate;
}
@keyframes heroDrift {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.2) rotate(10deg); }
}
.ib-hero > * { position: relative; z-index: 1; }
.ib-hero h1 {
    font-size: 2.6rem;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent), var(--c-accent-2));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}
.ib-hero p { color: var(--c-text); max-width: 640px; margin: 0 auto 1.2rem; font-size: 1.05rem; }
.ib-hero-badge {
    display: inline-block; padding: .35rem 1rem;
    background: rgba(167, 139, 250, .14); color: var(--c-primary);
    border-radius: 999px; font-size: .85rem; font-weight: 600;
    margin-bottom: 1.4rem; border: 1px solid var(--c-border-strong);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* ---------- Feature cards (landing) ---------- */
.ib-feature { text-align: center; }
.ib-feature .ib-feature-ico { margin: 0 auto .6rem; }
.ib-feature-ico {
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem; line-height: 1;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(167,139,250,.18), rgba(34,211,238,.12));
    border: 1px solid var(--c-border);
    margin-bottom: .8rem;
}
.ib-feature h3 { margin: .2rem 0 .4rem; }

/* ---------- List cards (dashboard) ---------- */
.ib-lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
}
.ib-list-card {
    background: var(--c-card);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    text-decoration: none;
    color: var(--c-text);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.ib-list-card:hover {
    transform: translateY(-3px);
    border-color: var(--c-border-strong);
    box-shadow: var(--shadow), 0 0 40px rgba(167,139,250,.25);
    color: var(--c-text);
}
.ib-list-card h3 { margin: 0; font-size: 1.2rem; }
.ib-list-card .ib-list-meta { color: var(--c-muted); font-size: .85rem; display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Theme sections ---------- */
.ib-theme { margin-top: 2rem; }
.ib-theme:first-of-type { margin-top: 1rem; }
.ib-theme-title {
    display: flex; align-items: baseline; gap: .5rem;
    padding-bottom: .5rem; margin-bottom: .3rem;
    border-bottom: 2px solid var(--c-border-strong);
}
.ib-theme-title::before {
    content: ''; display: inline-block; width: 8px; height: 18px; border-radius: 3px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-accent-2));
    transform: translateY(2px);
}

/* ---------- Idea cards ---------- */
.ib-ideas { list-style: none; padding: 0; margin: 1.5rem 0; display: flex; flex-direction: column; gap: .9rem; }
.ib-idea {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--c-card);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    transition: border-color .2s, transform .15s;
}
.ib-idea:hover { border-color: var(--c-border-strong); }
.ib-idea-body { flex: 1; min-width: 0; }
.ib-idea-body h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.ib-idea-desc { margin: .2rem 0 .5rem; color: var(--c-text); white-space: pre-wrap; }
.ib-idea-meta { color: var(--c-muted); font-size: .82rem; display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }
.ib-idea-actions { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }

/* Vote button */
.ib-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    min-width: 64px;
    padding: .6rem .4rem;
    border-radius: var(--radius-sm);
    background: rgba(10, 10, 26, 0.5);
    border: 1px solid var(--c-border);
    color: var(--c-text);
    cursor: pointer;
    box-shadow: none;
    transition: border-color .15s, background .15s, transform .12s;
}
.ib-vote:hover { transform: translateY(-1px); border-color: var(--c-primary); background: rgba(167,139,250,.12); box-shadow: none; color: var(--c-text); }
.ib-vote svg { width: 22px; height: 22px; transition: transform .15s; }
.ib-vote .ib-vote-count { font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; line-height: 1; }
.ib-vote.voted {
    background: linear-gradient(135deg, rgba(167,139,250,.25), rgba(34,211,238,.18));
    border-color: var(--c-primary);
    color: var(--c-text-strong);
}
.ib-vote.voted svg { transform: translateY(-2px); color: var(--c-accent); }
/* Vote non interactif (consultation publique / non membre) */
.ib-vote-static { cursor: default; }
.ib-vote-static:hover { transform: none; border-color: var(--c-border); background: rgba(10, 10, 26, 0.5); box-shadow: none; color: var(--c-text); }

/* Encart d'invitation a se connecter (liste publique) */
.ib-cta-public { background: linear-gradient(135deg, rgba(96,165,250,.1), rgba(167,139,250,.08)); border-color: rgba(96,165,250,.35); }

/* Members / managers chips */
.ib-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
.ib-chip {
    display: inline-flex; align-items: center; gap: .45rem;
    background: rgba(10, 10, 26, 0.5);
    border: 1px solid var(--c-border);
    border-radius: 999px;
    padding: .3rem .4rem .3rem .85rem;
    font-size: .88rem;
}
.ib-chip .ib-chip-x {
    background: transparent; color: var(--c-muted); border: 0; box-shadow: none;
    padding: .1rem .35rem; border-radius: 999px; font-size: 1rem; line-height: 1; cursor: pointer;
}
.ib-chip .ib-chip-x:hover { color: var(--c-error); background: rgba(248,113,113,.12); box-shadow: none; transform: none; }
.ib-chip-pending { opacity: .7; border-style: dashed; }

/* ---------- Notifications panel ---------- */
.ib-notifs { list-style: none; padding: 0; margin: 0; }
.ib-notif {
    display: flex; gap: .7rem; align-items: center;
    padding: .55rem .6rem;
    border-bottom: 1px solid var(--c-border);
    transition: background .15s;
}
.ib-notif:last-child { border-bottom: 0; }
.ib-notif.unread { background: rgba(167, 139, 250, .07); }
.ib-notif .ib-notif-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--c-muted); }
.ib-notif.unread .ib-notif-dot { background: linear-gradient(135deg, var(--c-primary), var(--c-accent-2)); box-shadow: 0 0 8px var(--c-primary); }
.ib-notif-text {
    flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--c-text);
}
.ib-notif.unread .ib-notif-text { font-weight: 600; }
.ib-notif-time { color: var(--c-muted); font-size: .8rem; flex-shrink: 0; white-space: nowrap; }

/* ---------- Index de navigation (ancres) ---------- */
.ib-anchornav {
    position: sticky;
    top: var(--header-h);
    z-index: 40;
    display: flex; flex-wrap: wrap; gap: .5rem;
    margin: 0 0 1.8rem;
    padding: .7rem 0;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--c-border);
}
.ib-anchornav a {
    display: inline-block;
    padding: .35rem .9rem;
    border-radius: 999px;
    background: rgba(167, 139, 250, .1);
    border: 1px solid var(--c-border);
    color: var(--c-text);
    font-size: .88rem;
    font-weight: 500;
    transition: border-color .15s, background .15s, color .15s;
}
.ib-anchornav a:hover { border-color: var(--c-primary); background: rgba(167, 139, 250, .18); color: var(--c-text-strong); }
/* Decalage pour que l'ancre ne passe pas sous le header + index collants */
.ib-anchor { scroll-margin-top: calc(var(--header-h) + 70px); }

/* ---------- Pager ---------- */
.ib-pager {
    display: flex; align-items: center; justify-content: center;
    gap: 1rem; margin-top: 1rem; padding-top: .9rem;
    border-top: 1px solid var(--c-border);
}
.ib-pager-info { color: var(--c-muted); font-size: .85rem; }
.ib-pager [aria-disabled="true"] { opacity: .4; cursor: default; pointer-events: none; box-shadow: none; }

/* ---------- Toasts (polling) ---------- */
.ib-toasts {
    position: fixed; top: 1rem; right: 1rem; z-index: 1000;
    display: flex; flex-direction: column; gap: .6rem;
    max-width: 360px;
}
.ib-toast {
    background: var(--c-card-solid);
    border: 1px solid var(--c-border-strong);
    border-left: 4px solid var(--c-primary);
    border-radius: var(--radius-sm);
    padding: .85rem 1rem;
    box-shadow: var(--shadow-lg);
    animation: slideInRight .3s ease-out;
    cursor: pointer;
}
.ib-toast a { color: var(--c-text-strong); font-weight: 600; }
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ---------- Empty state ---------- */
.ib-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--c-muted);
    border: 1px dashed var(--c-border-strong);
    border-radius: var(--radius);
}
.ib-empty h3 { color: var(--c-text); }

/* ---------- Modal (<dialog>) ---------- */
.ib-modal {
    border: 1px solid var(--c-border-strong);
    border-radius: var(--radius);
    padding: 1.8rem;
    background: var(--c-card-solid);
    color: var(--c-text);
    max-width: 560px;
    width: calc(100% - 2rem);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(167, 139, 250, .35);
}
.ib-modal::backdrop {
    background: rgba(10, 10, 26, 0.7);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ib-modal h2 { margin-top: 0; }
.ib-modal[open] { animation: bmModalIn .2s ease-out; }
@keyframes bmModalIn {
    from { opacity: 0; transform: translateY(-12px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ib-link-box { display: flex; gap: .4rem; align-items: stretch; margin: 1rem 0; }
.ib-link-box input { flex: 1; font-family: 'SF Mono', Consolas, monospace; font-size: .9rem; padding: .55rem .75rem; }

/* ---------- Google btn ---------- */
.ib-btn-google {
    background: #fff;
    color: #444;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-weight: 500;
}
.ib-btn-google:hover { color: #222; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.ib-btn-google svg { width: 18px; height: 18px; }

/* ---------- Misc ---------- */
hr { border: 0; border-top: 1px solid var(--c-border); margin: 2rem 0; }
code {
    background: rgba(167, 139, 250, .15);
    color: var(--c-accent);
    padding: .15rem .4rem;
    border-radius: 4px;
    font-size: .9em;
}
.ib-sep { text-align: center; margin: 1.5rem 0; color: var(--c-muted); position: relative; }
.ib-sep::before, .ib-sep::after {
    content: ''; position: absolute; top: 50%; width: 35%;
    border-top: 1px solid var(--c-border);
}
.ib-sep::before { left: 0; } .ib-sep::after { right: 0; }

@media (max-width: 700px) {
    :root { --header-h: 124px; }
    .ib-header .ib-container { flex-direction: column; align-items: flex-start; gap: .5rem; }
    .ib-header nav { width: 100%; flex-wrap: wrap; }
    h1 { font-size: 1.7rem; }
    .ib-stat-value { font-size: 1.9rem; }
    /* Sur petit ecran, l'index colle directement en haut pour eviter les decalages de hauteur de header */
    .ib-anchornav { position: static; }
}
