/* ==========================================================================
   Pages V2 : Tutoriels, Réseaux, Effectif.
   Même langage que l'accueil : grands titres à gauche, surfaces bento sans
   cadre, grands rayons, verre sur les couches flottantes.
   Chargé après da2026.css par tutos.html, reseaux.html et effectif.html.
   ========================================================================== */

/* ── En-tête de page partagé : grand titre à gauche dans un panneau ── */
body .page-header {
    margin: 0 0 2.2rem;
    padding: clamp(2rem, 5vw, 4.5rem) clamp(1.5rem, 5vw, 4.5rem);
    border-radius: 36px;
    text-align: left;
    background:
        radial-gradient(700px 360px at 100% 0%, rgba(76, 141, 255, 0.20), transparent 70%),
        var(--background-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), var(--shadow-md);
}
body .page-header .page-title {
    font-size: clamp(2.6rem, 6.5vw, 5.4rem);
    font-weight: 700; letter-spacing: -0.045em; line-height: 1.02;
    margin: 0 0 1rem; justify-content: flex-start;
}
body .page-header .page-subtitle { font-size: clamp(1rem, 1.5vw, 1.2rem); max-width: 62ch; margin: 0; }
body .page-header .gradient-text { background: none; -webkit-text-fill-color: currentColor; color: var(--text-tertiary); }

/* ==========================================================================
   RÉSEAUX
   ========================================================================== */
.rs-grille {
    display: grid; gap: 1rem;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(250px, auto);
}
.rs-tuile {
    --teinte: 76, 141, 255;
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem;
    padding: clamp(1.4rem, 2.4vw, 2.2rem);
    border-radius: 32px; text-decoration: none; color: var(--text-primary);
    background:
        radial-gradient(420px 260px at var(--mx, 85%) var(--my, 0%), rgba(var(--teinte), 0.28), transparent 70%),
        var(--background-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), var(--shadow-sm);
    transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.rs-tuile:hover { transform: translateY(-6px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 24px 60px -20px rgba(var(--teinte), 0.45); }
.rs-tuile:active { transform: translateY(-2px) scale(0.99); transition-duration: 0.1s; }
.rs-discord { --teinte: 88, 101, 242; grid-column: span 2; grid-row: span 2; }
.rs-tiktok { --teinte: 254, 44, 85; }
.rs-youtube { --teinte: 255, 0, 51; }
.rs-roblox { --teinte: 230, 230, 235; }

/* Nom de la plateforme en filigrane, en contour, comme le pied de page. */
.rs-tuile::before {
    content: attr(data-nom);
    position: absolute; right: -0.04em; bottom: -0.2em; z-index: -1;
    font-size: clamp(5rem, 11vw, 10rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1;
    color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.10);
    pointer-events: none; white-space: nowrap;
}
.rs-discord::before { font-size: clamp(7rem, 17vw, 16rem); }

.rs-marque {
    width: 84px; height: 84px; border-radius: 26px; overflow: hidden; flex: none;
    background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.rs-discord .rs-marque { width: 120px; height: 120px; border-radius: 34px; }
.rs-marque img { width: 100%; height: 100%; object-fit: cover; display: block; }

.rs-bas h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 700; letter-spacing: -0.035em; }
.rs-discord .rs-bas h3 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
.rs-bas p { color: var(--text-secondary); margin-top: 0.35rem; max-width: 36ch; line-height: 1.5; }
.rs-ouvrir {
    display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.1rem;
    font-weight: 600; font-size: 0.92rem; padding: 0.55rem 1rem; border-radius: 999px;
    background: var(--text-primary); color: var(--background-primary);
    transition: transform 0.35s var(--ease-out), background-color 0.3s ease, color 0.3s ease;
}
.rs-ouvrir .material-symbols-outlined { font-size: 1.1rem; transition: transform 0.35s var(--ease-out); }
.rs-tuile:hover .rs-ouvrir { background: rgb(var(--teinte)); color: #fff; }
.rs-roblox:hover .rs-ouvrir { color: #111; }
.rs-tuile:hover .rs-ouvrir .material-symbols-outlined { transform: translate(3px, -3px); }

@media (max-width: 900px) {
    .rs-grille { grid-template-columns: 1fr 1fr; }
    .rs-discord { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 560px) {
    .rs-grille { grid-template-columns: 1fr; }
    .rs-discord { grid-column: auto; }
}

/* ==========================================================================
   EFFECTIF
   ========================================================================== */
body .category-section { text-align: left; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
body .category-title {
    display: flex; align-items: center; gap: 1.2rem;
    font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 700; letter-spacing: -0.04em;
    border: 0; padding: 0; margin-bottom: 1.6rem; text-align: left;
}
body .category-title::after { content: ''; flex: 1; height: 1px; background: var(--border-color); }

body .roles-row { justify-content: flex-start; gap: clamp(1.5rem, 3vw, 2.5rem); }
body .role-section {
    background: none; border: 0; padding: 0; min-width: 0;
    text-align: left; align-items: flex-start;
}
body .role-title {
    font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em;
    color: var(--text-tertiary); text-align: left; margin-bottom: 0.9rem;
}
body .members-grid { justify-content: flex-start; gap: 1rem; }

body .member-card {
    width: clamp(200px, 17vw, 250px);
    padding: 1.3rem 1.3rem 1.4rem;
    border: 0; border-radius: 28px;
    align-items: flex-start; text-align: left; gap: 0.9rem;
    background: var(--background-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-sm);
    transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
body .member-card:hover {
    transform: translateY(-6px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), var(--shadow-lg);
    border-color: transparent;
}
body .member-avatar { width: 88px; height: 88px; border-radius: 28px; object-fit: cover; border: 0; }
body .member-name { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; text-align: left; }
body .member-username { text-align: left; color: var(--text-tertiary); }

/* Fenêtre détail : feuille arrondie, verre dessous. */
body .modal-overlay { -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); background: rgba(0, 0, 0, 0.5); }
body .modal {
    border-radius: 34px; border: 1px solid var(--border-strong);
    background: var(--background-elevated); box-shadow: var(--shadow-xl);
}
body .modal-close { border-radius: 50%; }
body .modal-avatar { border-radius: 32px; }
body .modal-discord-btn { border-radius: 16px; }
body .modal-section-title { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; color: var(--text-tertiary); }

@media (max-width: 640px) {
    body .member-card { width: calc(50% - 0.5rem); padding: 1rem; }
    body .member-avatar { width: 64px; height: 64px; border-radius: 20px; }
}

/* ==========================================================================
   TUTORIELS
   ========================================================================== */
body .bg-decor, body .blob { display: none; }

body .sidebar {
    border-radius: 28px;
    border: 1px solid var(--border-strong);
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-md);
}
body .sidebar-title h2 { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-tertiary); }
body .sidebar-title .title-icon { border-radius: 14px; }
body .cp-header { border-radius: 18px; }
body .cp-header.active {
    background: var(--primary-color); color: #fff;
    box-shadow: 0 6px 20px rgba(76, 141, 255, 0.35);
}
body .cp-header.active .cp-icon { color: #fff; }
body .sub-item { border-radius: 14px; }
body .sub-item.active { background: rgba(76, 141, 255, 0.16); color: var(--text-primary); }

body .content-breadcrumb {
    font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-tertiary);
}
body .content-title {
    font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1.02;
}
body .content-title .grad { background: none; -webkit-text-fill-color: currentColor; color: var(--text-tertiary); }
body .content-lead { font-size: clamp(1rem, 1.4vw, 1.2rem); max-width: 62ch; }

body .tutorial-card {
    border: 0; border-radius: 28px;
    background: var(--background-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-sm);
    transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
body .tutorial-card:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255,255,255,.09), var(--shadow-lg); }
body .pill { border-radius: 999px; }
body .video-embed { border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg); }
body .empty-state-icon { border-radius: 28px; }

/* Réseaux : Discord à gauche sur deux rangées, TikTok/YouTube à droite,
   Roblox en bandeau sur toute la largeur dessous. */
.rs-roblox { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; gap: 1.8rem; min-height: 0; }
.rs-roblox .rs-bas { flex: 1; }
.rs-tuile::before { -webkit-text-stroke-color: rgba(255, 255, 255, 0.06); }
@media (max-width: 560px) { .rs-roblox { flex-direction: column; align-items: flex-start; } }

/* ==========================================================================
   V3 : Réseaux (lueur partagée), Tutoriels (hub), Effectif (annuaire)
   ========================================================================== */

/* ── Réseaux : une lueur parcourt la grille et change de couleur ── */
.rs-grille { position: relative; isolation: isolate; }
.rs-lueur {
    --lc: 76, 141, 255;
    position: absolute; left: 0; top: 0; width: 600px; height: 600px; z-index: 0;
    border-radius: 50%; pointer-events: none; opacity: 0;
    background: radial-gradient(circle, rgba(var(--lc), 0.60) 0%, rgba(var(--lc), 0.22) 38%, transparent 68%);
    filter: blur(8px);
    transition: opacity 0.5s ease;
    will-change: transform;
}
.rs-tuile {
    z-index: 1;
    background: rgba(20, 20, 26, 0.64);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.rs-tuile:hover { background: rgba(24, 24, 31, 0.5); }

/* ── Tutoriels : un hub de catégories, plus de barre latérale ── */
body .sidebar-open-btn { display: none !important; }
body .tutos-shell,
body .tutos-shell.shell-collapsed {
    display: flex; flex-direction: column; gap: 1.2rem; grid-template-columns: none;
}
body .sidebar,
body .tutos-shell.shell-collapsed .sidebar {
    position: static; height: auto; overflow: visible;
    background: none; border: 0; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    transform: none; opacity: 1; pointer-events: auto; animation: none;
}
body .sidebar-inner { height: auto; }
body .sidebar-top { display: none; }
body .sidebar-content { padding: 0; overflow: visible; }
body .tree {
    display: grid; gap: 1rem; padding: 0; align-items: start;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
}
body .cp {
    border: 0; border-radius: 30px; padding: 1.3rem 1.3rem 1.2rem;
    background: var(--background-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-sm);
    transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), background 0.4s ease;
}
body .cp:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255,255,255,.09), var(--shadow-lg); }
body .cp:has(.cp-header.active) {
    background:
        radial-gradient(420px 220px at 100% 0%, rgba(76, 141, 255, 0.30), transparent 70%),
        var(--background-secondary);
    box-shadow: inset 0 0 0 1px rgba(76, 141, 255, 0.45), var(--shadow-md);
}
body .cp-header,
body .cp-header:hover,
body .cp-header:active,
body .cp-header.active {
    flex-direction: column; align-items: flex-start; gap: 1.1rem;
    padding: 0; background: none; box-shadow: none; transform: none; border-radius: 0;
}
body .cp-icon { width: 60px; height: 60px; border-radius: 20px; }
body .cp-header.active .cp-icon { background: var(--primary-color); }
body .cp-icon svg { width: 28px; height: 28px; }
body .cp-logo { width: 30px; height: 30px; }
body .cp-label { font-size: clamp(1.25rem, 1.8vw, 1.6rem); font-weight: 700; letter-spacing: -0.03em; }
body .cp-sub { padding-left: 0; flex-direction: row; flex-wrap: wrap; gap: 0.4rem; }
body .sub-item {
    padding: 0.45rem 0.85rem; border-radius: 999px; font-size: 0.84rem;
    background: rgba(255, 255, 255, 0.06);
}
body .sub-item::before, body .sub-item::after, body .sub-dot { display: none; }
body .sub-item.active { background: var(--primary-color); color: #fff; }
body .sub-item:hover { background: rgba(255, 255, 255, 0.11); }

body .content {
    background: var(--background-secondary); border: 0; border-radius: 36px; overflow: visible;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-md);
    -webkit-backdrop-filter: none; backdrop-filter: none;
}
body .content-inner { padding: clamp(1.6rem, 4vw, 3.4rem); }

/* ── Effectif : un annuaire, une catégorie par bloc, les membres en lignes ── */
body .category-section {
    display: grid; grid-template-columns: minmax(200px, 300px) 1fr;
    gap: clamp(1rem, 3vw, 3rem); align-items: start;
    padding: clamp(1.4rem, 3vw, 2.4rem) 0;
    border-top: 1px solid var(--border-color);
    margin: 0;
}
body .category-section .category-title {
    position: sticky; top: calc(var(--nav-height) + 1.2rem);
    flex-direction: column; align-items: flex-start; gap: 0.5rem;
    font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.12; margin: 0;
}
body .category-title::after { display: none; }
body .roles-row { display: flex; flex-direction: column; gap: 1.6rem; width: 100%; }
body .role-section { width: 100%; }
body .role-title {
    padding-bottom: 0.6rem; margin-bottom: 0.4rem; width: 100%;
    border-bottom: 1px solid var(--border-color);
}
body .members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0.3rem 1.2rem; }
body .member-card {
    width: auto; flex-direction: row; align-items: center; gap: 1rem;
    padding: 0.7rem 0.8rem; border-radius: 22px;
    background: none; box-shadow: none;
}
body .member-card:hover {
    transform: none; background: var(--background-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), var(--shadow-sm);
}
body .member-avatar { width: 56px; height: 56px; border-radius: 18px; flex: none; }
body .member-card > :not(.member-avatar) { min-width: 0; }
body .member-name { font-size: 0.98rem; }
body .member-username { font-size: 0.8rem; }

@media (max-width: 860px) {
    body .category-section { grid-template-columns: 1fr; }
    body .category-section .category-title { position: static; }
    body .member-card { width: auto; }
}

/* Corrections annuaire : titre en un bloc, nom et pseudo empilés à côté de l'avatar. */
body .category-section .category-title { display: block; }
body .member-card {
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    column-gap: 1rem; row-gap: 0.1rem; align-items: center;
}
body .member-avatar { grid-row: 1 / span 2; }
body .member-name, body .member-username {
    grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
body .member-name { align-self: end; }
body .member-username { align-self: start; }

/* Les grades d'une catégorie se rangent côte à côte quand la place le permet. */
body .roles-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 1.6rem 2rem; align-items: start; }
body .members-grid { grid-template-columns: 1fr; }

/* ==========================================================================
   V4 : toutes les pages à pleine largeur, effectif en organigramme
   ========================================================================== */
body .page-content, body .page-content.width-wide, body .page-content.width-narrow {
    max-width: none; width: 100%;
    padding-left: clamp(1rem, 3vw, 3rem); padding-right: clamp(1rem, 3vw, 3rem);
}

/* Organigramme : des paliers empilés, du plus haut au plus bas, reliés par un trait. */
body main #staffContainer { display: flex; flex-direction: column; align-items: stretch; width: 100%; }
body main .category-section {
    display: block; position: relative; text-align: center;
    padding: clamp(2rem, 4vw, 3.2rem) 0; border-top: 0; margin: 0;
}
body main .category-section + .category-section::before {
    content: ''; position: absolute; top: 0; left: 50%; width: 1px; height: clamp(1.6rem, 3vw, 2.6rem);
    background: linear-gradient(var(--border-strong), transparent);
}
body main .category-section .category-title {
    position: static; display: block; margin: 0 auto clamp(1.4rem, 2.6vw, 2.2rem);
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--text-tertiary);
}
body main .category-title::after { display: none; }

body main .roles-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.6rem clamp(2rem, 5vw, 5rem); }
body main .role-section { --role-couleur: var(--primary-color); width: auto; min-width: 0; align-items: center; text-align: center; }
body main .role-title {
    width: auto; margin: 0 0 1.3rem; padding: 0; border: 0; text-align: center;
    font-size: clamp(1.3rem, 2.2vw, 1.9rem); font-weight: 700; letter-spacing: -0.035em;
    text-transform: none;
}
body main .role-title .role-nom {
    color: color-mix(in srgb, var(--role-couleur) 62%, #ffffff);
    text-shadow: 0 0 28px color-mix(in srgb, var(--role-couleur) 45%, transparent);
}
body main .role-section:not(.a-couleur) .role-nom { color: var(--text-primary); text-shadow: none; }
body main .members-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4rem; }

body main .member-card {
    display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
    width: clamp(130px, 11vw, 168px); padding: 0.4rem; text-align: center;
    background: none; box-shadow: none; border-radius: 28px;
}
body main .member-card:hover { background: none; box-shadow: none; transform: translateY(-6px); }
body main .member-avatar {
    width: clamp(84px, 7vw, 112px); height: clamp(84px, 7vw, 112px); border-radius: 50%; object-fit: cover; grid-row: auto;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--role-couleur) 70%, #fff), 0 16px 32px rgba(0, 0, 0, 0.45);
    transition: transform 0.5s var(--ease-out), box-shadow 0.4s ease;
}
body main .role-section:not(.a-couleur) .member-avatar { box-shadow: 0 0 0 3px var(--border-strong), 0 16px 32px rgba(0, 0, 0, 0.45); }
body main .member-card:hover .member-avatar {
    transform: scale(1.07);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--role-couleur) 70%, #fff), 0 0 36px color-mix(in srgb, var(--role-couleur) 55%, transparent), 0 18px 36px rgba(0, 0, 0, 0.5);
}
body main .member-name, body main .member-username {
    grid-column: auto; text-align: center; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body main .member-name { font-size: 0.98rem; font-weight: 600; letter-spacing: -0.015em; }
body main .member-username { font-size: 0.8rem; margin-top: -0.4rem; }

/* ==========================================================================
   EFFECTIF V5 : des bandeaux de grade, les membres en cartes portrait
   ========================================================================== */
body main .category-section { text-align: left; padding: clamp(1.6rem, 3vw, 2.8rem) 0 0.4rem; }
body main .category-section + .category-section::before { display: none; }
body main .category-section .category-title {
    margin: 0 0 1rem; text-align: left;
    font-size: clamp(2.2rem, 5.6vw, 4.8rem); font-weight: 700; letter-spacing: -0.05em; line-height: 1;
    text-transform: none; color: transparent; -webkit-text-stroke: 1px var(--border-strong);
}

body main .roles-row { display: flex; flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; gap: 0.9rem; }
body main .role-section {
    --role-couleur: var(--primary-color);
    width: 100%; display: grid; grid-template-columns: minmax(170px, 260px) minmax(0, 1fr);
    gap: clamp(1rem, 2.4vw, 2.4rem); align-items: center; text-align: left;
    padding: clamp(1rem, 2vw, 1.6rem); border-radius: 40px;
    background:
        radial-gradient(560px 220px at 0% 50%, color-mix(in srgb, var(--role-couleur) 26%, transparent), transparent 70%),
        var(--background-secondary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--shadow-sm);
}
body main .role-title {
    grid-column: 1; margin: 0; text-align: left; align-self: center;
    font-size: clamp(1.3rem, 2.2vw, 2rem); line-height: 1.1;
}
body main .members-grid { grid-column: 2; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0.8rem; }
body main .member-card {
    width: clamp(132px, 11vw, 160px); padding: 1rem 0.5rem 0.9rem; gap: 0.5rem;
    border-radius: 28px; background: rgba(0, 0, 0, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    transition: transform 0.5s var(--ease-out), background-color 0.3s ease;
}
body main .member-card:hover { background: color-mix(in srgb, var(--role-couleur) 22%, rgba(0, 0, 0, 0.22)); transform: translateY(-5px); }
body main .member-avatar { width: 78px; height: 78px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--role-couleur) 70%, #fff), 0 10px 22px rgba(0, 0, 0, 0.4); }
body main .member-card:hover .member-avatar { transform: none; }
body main .member-name { font-size: 0.92rem; }
@media (max-width: 860px) {
    body main .role-section { grid-template-columns: 1fr; }
    body main .role-title, body main .members-grid { grid-column: 1; }
}
