@import url("authenticator-2SOfrkw.css");
@import url("profile-CyIwNYO.css");
@import url("program-2ERSYSJ.css");
@import url("workout-SkjjgrZ.css");
@import url("exercice-VArLABv.css");
@import url("dashboard-EgdRQgy.css");
@import url("home-ngHnvlj.css");
/* program-show.css a été fusionné dans program.css, donc plus besoin */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

body {
    background-color: #FFF;
}

:root {
    /* Palette marque */
    --color-noir-charbon: #1C1C1C;
    --color-creme-clair: #F5F2EB;
    --color-dore: #E8B430;

    /* Palette étendue */
    --color-dore-fonce: #A87816;
    --color-gris-fonce: #262422;
    --color-gris-mid: #47433D;
    --color-rouge-effort: #C1432D;
    --font-display: 'Archivo Black', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --container-max: 1240px;

    /* Variables communes aux modules */
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 12px 40px rgba(232, 180, 48, 0.15);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ... le reste inchangé ... */
.header_container{
    width: 100%;
    height: 100px;
    background: #111;
    z-index: 999;
    position: relative;
}

.nav_container{
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 40px;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.logo-img{
    height: 70px;
}

.menu_button{
    width: 50px;
    height: 50px;
    border: none;
    position: relative;
    cursor: pointer;
    background: none;
}

.li{
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-dore);
    transition: transform .4s ease, opacity .3s ease;  /* animation douce */
    }

    /* placement initial des 3 traits */
    .menu_button .li1{ top: 12px; }
    .menu_button .li2{ top: 23px; }
    .menu_button .li3{ top: 34px; }

        /* ----------  ÉTAT ACTIF  ---------- */
    .menu_button.active .li2{
      opacity: 0;                /* trait du centre disparaît */
    }
    .menu_button.active .li1{
      transform: translateY(11px) rotate(135deg);   /* haut → diagonale */
    }
    .menu_button.active .li3{
      transform: translateY(-11px) rotate(-135deg); /* bas → diagonale */
    }

    .list_menu{
        position: absolute;
        top: 100px;
        left: 0;
        width: 100%;
        height: 0;
        overflow: hidden;
        max-height: 1200px;
        background-color: var(--color-noir-charbon);
        color: var(--color-creme-clair);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        list-style: none;
        font-size: 2rem;
        transition: height 0.3s ease-in-out;
        z-index: -1;
    }

    .list_menu.active{
        height: calc(100vh - 100px);
    }

    .list_menu a{
        color: var(--color-creme-clair);
        text-decoration: none;
        display: block;
        width: 100%;
        text-align: center;
        transition: color .3s ease;
        padding: 4px 0;
    }

    .list_menu a:hover{
        color: var(--color-dore);
    }

/*==========================*/

.main_container{
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    
}

.section_landing{
    width: 100%;
    height: calc(100vh - 100px);
    max-height: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.section_landing::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('/picture/image/wallpaper.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: .7; 
    z-index: -1; 
}
.section_landing::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--color-noir-charbon);
    opacity: 1;
    z-index: -5; 
}



.presentation{
    width: 90%;
    max-width: 750px;
    padding: 20px;
    text-align: center;
    transform: translateY(100px);
}

.title_rise{
    font-weight: bold;
    font-size: 5rem;
    text-transform: uppercase;
    color: var(--color-dore);
    text-shadow: 4px 4px 2px rgba(6, 6, 6, 0.2);
}

.subtitle{
    color: var(--color-creme-clair);
    font-weight: bold;
    font-size: 1.5rem;
    text-shadow: 4px 4px 2px rgba(0, 0, 0, 0.2);
}

.add_button{
    display: inline-block;
    text-align: center;
    border: none;
    background: var(--color-dore);
    color: var(--color-gris-fonce);
    font-size: 1.45rem;
    padding: 10px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 20px;
    border-radius: 15px;
}


/* ============================================================
   FLASH MESSAGES GLOBAUX
   ============================================================ */
.global-flash {
    position: fixed;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    max-width: 560px;
    width: calc(100% - 32px);
    padding: 13px 22px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
    animation: flashIn .35s ease both;
    border: 1px solid;
}
.global-flash-success { background: rgba(28, 62, 30, 0.95); color: #a5d6a7; border-color: rgba(76, 175, 80, 0.4); }
.global-flash-warning { background: rgba(74, 57, 10, 0.95); color: #ffe082; border-color: rgba(232, 180, 48, 0.4); }
.global-flash-danger  { background: rgba(66, 22, 14, 0.95); color: #ef9a9a; border-color: rgba(193, 67, 45, 0.4); }
.global-flash-error   { background: rgba(66, 22, 14, 0.95); color: #ef9a9a; border-color: rgba(193, 67, 45, 0.4); }
@keyframes flashIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   MODE APERÇU ADMIN + NAVIGATION RAPIDE
   ============================================================ */
.preview-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(232, 180, 48, 0.1);
    border: 1px dashed rgba(232, 180, 48, 0.4);
    color: var(--color-dore);
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 22px;
    font-size: 0.88rem;
}
.preview-banner a {
    color: var(--color-creme-clair);
    font-weight: 700;
    text-decoration: underline;
}
.preview-banner a:hover { color: #fff; }

.quick-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 26px;
    padding: 14px;
    background: rgba(28, 28, 28, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}
.quick-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(245, 242, 235, 0.75);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}
.quick-nav a:hover {
    background: rgba(232, 180, 48, 0.12);
    border-color: rgba(232, 180, 48, 0.3);
    color: var(--color-dore);
    transform: translateY(-1px);
}

/* ============================================================
   LAYOUT APP : SIDEBAR (desktop) + BOTTOM NAV (mobile)
   ============================================================ */
.app-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== SIDEBAR ===== */
.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 252px;
    height: 100vh;
    background: #0d0d0d;
    border-right: 1px solid rgba(232, 180, 48, 0.12);
    display: none;
    flex-direction: column;
    z-index: 900;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 26px 24px 22px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand-mark {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--color-dore);
    text-transform: uppercase;
}

.sidebar-brand-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(245, 242, 235, 0.4);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    color: rgba(245, 242, 235, 0.65);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: var(--transition);
}

.sidebar-link:hover {
    background: rgba(232, 180, 48, 0.08);
    color: var(--color-creme-clair);
}

.sidebar-link.active {
    background: rgba(232, 180, 48, 0.14);
    color: var(--color-dore);
    box-shadow: inset 3px 0 0 var(--color-dore);
}

.sidebar-account {
    padding: 14px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-logout {
    color: #ef9a9a;
}

.sidebar-logout:hover {
    background: rgba(193, 67, 45, 0.1);
    color: #ffb4a2;
}

/* ===== BOTTOM NAV (mobile) ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(13, 13, 13, 0.97);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(232, 180, 48, 0.15);
    display: none;
    justify-content: space-around;
    align-items: stretch;
    z-index: 950;
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: rgba(245, 242, 235, 0.5);
    text-decoration: none;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 0;
}

.bottom-nav-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.bottom-nav-item.active {
    color: var(--color-dore);
    background: rgba(232, 180, 48, 0.08);
}

.bottom-nav-item:hover {
    color: var(--color-creme-clair);
}

/* ===== RESPONSIVE LAYOUT ===== */
@media (min-width: 1024px) {
    .app-sidebar { display: flex; }
    .app-main.has-sidebar { margin-left: 252px; }
    /* Desktop : le header reste visible pour les visiteurs (pas de sidebar),
       et ne se masque que lorsque la sidebar est présente (utilisateur connecté) */
    .app-main.has-sidebar .header_container { display: none; }
    .header_container { display: block; }
    .bottom-nav { display: none; }
}

@media (max-width: 1023px) {
    .app-sidebar { display: none; }
    .header_container { display: block; }
    .bottom-nav { display: flex; }
    .app-main { padding-bottom: 74px; }
}

/* ============================================================
   GRAPHIQUES
   ============================================================ */
.chart-box {
    height: 220px;
    position: relative;
}

/* ============================================================
   BUILDER DE PROGRAMMES
   ============================================================ */
.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-dore), var(--color-dore-fonce));
    color: var(--color-noir-charbon);
    font-weight: 900;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.builder-workout {
    background: rgba(28, 28, 28, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid var(--color-dore);
    border-radius: 14px;
    padding: 16px;
    transition: var(--transition);
}
.builder-workout.sorting { opacity: 0.5; border-color: var(--color-dore); }
.builder-workout-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.builder-day {
    background: rgba(232, 180, 48, 0.15);
    color: var(--color-dore);
    border: 1px solid rgba(232, 180, 48, 0.25);
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.drag-handle {
    color: rgba(245, 242, 235, 0.3);
    cursor: grab;
    font-size: 1.1rem;
    user-select: none;
}
.drag-handle:active { cursor: grabbing; }
.builder-exercise {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 8px 12px;
    transition: var(--transition);
}
.builder-exercise.sorting { opacity: 0.5; border-color: var(--color-dore); }

.notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: auto;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--color-dore), var(--color-dore-fonce));
    color: var(--color-noir-charbon);
    font-size: 0.72rem;
    font-weight: 800;
}

/* ============================================================
   ONBOARDING
   ============================================================ */
.onboarding-progress {
    background: rgba(28, 28, 28, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 18px;
}
.onboarding-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    overflow: hidden;
}
.onboarding-progress-bar span {
    display: block;
    height: 100%;
    width: 33%;
    background: linear-gradient(90deg, var(--color-dore), var(--color-dore-fonce));
    border-radius: 50px;
    transition: width .35s ease;
}
.onboarding-progress-labels {
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-dore);
}

/* ============================================================
   MODE CLAIR (data-theme="light")
   ============================================================ */
[data-theme="light"] {
    --color-noir-charbon: #F5F2EB;
    --color-creme-clair: #1C1C1C;
    --color-gris-fonce: #E9E4D9;
    --color-gris-mid: #5A564D;
    --color-dore: #B8860B;
    --color-dore-fonce: #8A6406;
    --color-rouge-effort: #B33B26;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.07);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] body { background: var(--color-noir-charbon); }

[data-theme="light"] .dash-container,
[data-theme="light"] .program-container,
[data-theme="light"] .profile-container,
[data-theme="light"] .legal-container {
    background: linear-gradient(145deg, #faf7f0 0%, #eee9de 100%);
}

[data-theme="light"] .dash-panel,
[data-theme="light"] .stat-card,
[data-theme="light"] .program-card,
[data-theme="light"] .home-card,
[data-theme="light"] .home-feature {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .dash-hero,
[data-theme="light"] .profile-header {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(184, 134, 11, 0.25);
}

[data-theme="light"] .stat-card::after { background: linear-gradient(90deg, var(--color-dore), transparent); }

[data-theme="light"] .dash-list-item { border-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .dash-list-item:hover { background: rgba(184, 134, 11, 0.06); }

[data-theme="light"] .app-sidebar {
    background: #f0ece3;
    border-right-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .sidebar-brand, [data-theme="light"] .sidebar-account { border-color: rgba(0, 0, 0, 0.07); }
[data-theme="light"] .sidebar-link { color: rgba(28, 28, 28, 0.6); }
[data-theme="light"] .sidebar-link:hover { background: rgba(184, 134, 11, 0.08); color: #1C1C1C; }
[data-theme="light"] .sidebar-link.active { background: rgba(184, 134, 11, 0.15); color: #8A6406; }

[data-theme="light"] .header_container, [data-theme="light"] .nav_container { background: #f0ece3; }
[data-theme="light"] .list_menu { background: #f0ece3; color: #1C1C1C; }
[data-theme="light"] .list_menu a { color: #1C1C1C; }
[data-theme="light"] .list_menu a:hover { color: var(--color-dore); }

[data-theme="light"] .bottom-nav { background: rgba(240, 236, 227, 0.97); border-top-color: rgba(184, 134, 11, 0.2); }
[data-theme="light"] .bottom-nav-item { color: rgba(28, 28, 28, 0.5); }
[data-theme="light"] .bottom-nav-item.active { color: var(--color-dore); background: rgba(184, 134, 11, 0.1); }

[data-theme="light"] .site_footer { background: #e8e4da; }
[data-theme="light"] .footer_grid { border-color: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .footer_col a { color: rgba(28, 28, 28, 0.6); }

[data-theme="light"] .builder-workout {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.07);
}
[data-theme="light"] .builder-exercise { background: rgba(0, 0, 0, 0.03); border-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .drag-handle { color: rgba(28, 28, 28, 0.3); }

[data-theme="light"] .quick-nav { background: rgba(255, 255, 255, 0.7); border-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .quick-nav a { background: rgba(0, 0, 0, 0.04); border-color: rgba(0, 0, 0, 0.07); color: rgba(28, 28, 28, 0.7); }

[data-theme="light"] .preview-banner { background: rgba(184, 134, 11, 0.12); border-color: rgba(184, 134, 11, 0.4); }

[data-theme="light"] .onboarding-progress { background: rgba(255, 255, 255, 0.8); border-color: rgba(0, 0, 0, 0.07); }

[data-theme="light"] .leaderboard_card { background: rgba(255, 255, 255, 0.9); border-color: rgba(184, 134, 11, 0.3); }
[data-theme="light"] .leaderboard_row { border-color: rgba(0, 0, 0, 0.06); }

[data-theme="light"] .mission_section, [data-theme="light"] .steps_section { background: #f7f4ec; }
[data-theme="light"] .mission_text h2, [data-theme="light"] .steps_head h2, [data-theme="light"] .steps_list h3 { color: #1C1C1C; }
[data-theme="light"] .mission_text p, [data-theme="light"] .steps_list p { color: var(--color-gris-mid); }

/* Formulaire : fonds blancs, texte sombre */
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: #fff !important;
    color: #1C1C1C !important;
    border-color: rgba(0, 0, 0, 0.18) !important;
}
[data-theme="light"] select.form-select { background: #fff; }
[data-theme="light"] .form-select option { background: #fff; color: #1C1C1C; }
[data-theme="light"] input[type="date"] { color-scheme: light; }

[data-theme="light"] .global-flash-success { background: rgba(232, 245, 233, 0.97); color: #2e7d32; }
[data-theme="light"] .global-flash-warning { background: rgba(255, 248, 225, 0.97); color: #8a6406; }
[data-theme="light"] .global-flash-danger { background: rgba(255, 235, 238, 0.97); color: #b33b26; }

/* ============================================================
   ACCESSIBILITÉ + SKELETON
   ============================================================ */
.skip-link {
    position: absolute;
    top: -60px;
    left: 16px;
    z-index: 2000;
    background: var(--color-dore);
    color: var(--color-noir-charbon);
    padding: 10px 20px;
    border-radius: 0 0 12px 12px;
    font-weight: 700;
    text-decoration: none;
    transition: top .2s ease;
}
.skip-link:focus {
    top: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--color-dore);
    outline-offset: 2px;
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}
.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(232, 180, 48, 0.12), transparent);
    animation: skeleton-shimmer 1.4s infinite;
}
@keyframes skeleton-shimmer {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}
[data-theme="light"] .skeleton { background: rgba(0, 0, 0, 0.05); }

/* ============================================================
   POLISH RESPONSIVE (mobile-first)
   ============================================================ */
html, body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }

/* Header mobile compact (64px au lieu de 100px) */
@media (max-width: 768px) {
    .header_container { height: 64px; }
    .nav_container { padding: 0 16px; }
    .logo-img { height: 44px; }
    .menu_button { width: 40px; height: 40px; }
    .menu_button .li1 { top: 10px; }
    .menu_button .li2 { top: 19px; }
    .menu_button .li3 { top: 28px; }
    .list_menu { top: 64px; }
}

/* Grilles inline -> 1 colonne sur mobile */
@media (max-width: 640px) {
    .grid-mobile-stack {
        grid-template-columns: 1fr !important;
    }
    .grid-mobile-2 {
        grid-template-columns: 1fr !important;
    }

    .dash-hero { padding: 20px 16px; gap: 14px; }
    .dash-hero-avatar { width: 52px; height: 52px; font-size: 1.3rem; }
    .dash-hero-info h1 { font-size: 1.25rem; }
    .dash-hero-actions .btn-create { padding: 9px 16px; font-size: 0.8rem; }

    .dash-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-value { font-size: 1.5rem; }

    .dash-panel { padding: 16px 14px; }
    .dash-panel-header { gap: 8px; }

    .builder-workout { padding: 12px; }
    .builder-workout-head { gap: 8px; }
    .builder-day { font-size: 0.62rem; padding: 2px 8px; }
    .builder-exercise { padding: 8px; }

    .leaderboard_row { padding: 12px 14px; }
    .leaderboard_row .time { max-width: 45%; font-size: 0.75rem; }

    .footer_grid { gap: 24px; }
    .footer_bottom { font-size: 0.68rem; }
}

/* ============================================================
   FIX RESPONSIVE : empêcher les débordements horizontaux
   (min-content des grilles/flex force la largeur parent)
   ============================================================ */
.dash-grid > *,
.grid-mobile-stack > *,
.form_row_2 > *,
.form_row_3 > * {
    min-width: 0;
}

/* Les selects ne doivent jamais pousser la largeur de la page */
.form_group select,
select.form-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* Empêcher les flex internes de déborder */
.dash-item-body,
.dash-item-end,
.dash-panel-header,
.dash-hero-actions {
    min-width: 0;
}

@media (max-width: 640px) {
    /* Grille d'assignation coach : empiler proprement */
    .grid-mobile-stack {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .grid-mobile-stack > * {
        width: 100%;
    }
    /* Panel : le contenu interne ne force plus la largeur */
    .dash-panel {
        min-width: 0;
        overflow: hidden;
    }
    /* Boutons inline flexibles */
    .dash-item-end {
        flex-wrap: wrap;
        gap: 6px;
    }
    .dash-hero-actions .btn-create {
        white-space: normal;
    }
}

/* filets de formulaire : garantie d'empilement sur mobile */
@media (max-width: 640px) {
    .form_row_2, .form_row_3 {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .list_menu.active { height: calc(100vh - 64px); }
}