/* 
 * MPE Equipe Collation - Premium Design System
 * Modern aesthetics with glassmorphism and smooth interactions.
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;600;700&display=swap');

:root {
    /* ─── Base palette — modifier ici pour rethémer toute l'app ─── */
    --bg-h: 220;      /* Teinte */
    --bg-s: 30%;      /* Saturation */

    /* ─── Niveaux de surface (tous dérivés de --bg-h / --bg-s) ─── */
    --bg-color:           var(--bg-h), var(--bg-s), 8%;   /* Fond de l'app */
    --bg-float:           var(--bg-h), var(--bg-s), 12%;  /* Panneaux flottants, modales, toasts */
    --bg-widget:          var(--bg-h), var(--bg-s), 15%;  /* Datepicker, widgets imbriqués */
    --bg-widget-hi:       var(--bg-h), var(--bg-s), 18%;  /* Dropdowns dans les widgets */
    --bg-btn-muted:       var(--bg-h), var(--bg-s), 25%;  /* Boutons neutres */
    --bg-btn-muted-hover: var(--bg-h), var(--bg-s), 28%;  /* Boutons neutres hover */

    --text-primary: 220, 20%, 95%;
    --text-secondary: 220, 15%, 70%;

    --accent-primary: 225, 86%, 54%;
    /* Blue #2559ef */
    --accent-secondary: 190, 100%, 60%;
    /* Cyan */
    --accent-gradient: linear-gradient(135deg, hsl(var(--accent-primary)), hsl(var(--accent-secondary)));

    --glass-bg: var(--bg-widget); /* alias pour compatibilité */
    --glass-border: 220, 20%, 30%;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --sidebar-width: 110px;
    --radius-lg: 12px;
    --radius-md: 8px;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: hsl(var(--bg-color));
    color: hsl(var(--text-primary));
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.page-wrapper {
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    padding-top: 1.5rem;
    flex :  1;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45em;
    padding: 12px 32px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.4s var(--ease-out-expo);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    line-height: 1;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: hsl(var(--accent-primary));
    color: white;
    box-shadow: 0 10px 30px -10px hsla(var(--accent-primary), 0.5);
    border: 1px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -12px hsla(var(--accent-primary), 0.6);
}

/* Glassmorphism Card */
.glass-panel {
    background: hsla(var(--glass-bg), 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid hsla(var(--glass-border), 0.3);
    border-radius: var(--radius-lg);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: hsla(var(--glass-bg), 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid hsla(var(--glass-border), 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    z-index :  100;
    overflow-y: auto;
    overflow-x: visible;
}

.sidebar-logo {
    padding: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.sidebar-logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.sidebar-logo img {
    width: 36px;
    height: auto;
    display: block;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 6px;
    width: calc(100% - 8px);
    margin: 0 4px;
    text-decoration: none;
    color: hsl(var(--text-secondary));
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    font-size: 0.82rem;
}

.sidebar-item i {
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
}

.sidebar-item span {
    font-size: 0.6rem;
    text-align: center;
    line-height: 1.2;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-item:hover {
    color: hsl(var(--text-primary));
    background: hsla(var(--glass-bg), 0.4);
}

.sidebar-item.sidebar-active {
    color: hsl(var(--text-primary));
    background: hsla(var(--accent-primary), 0.15);
}

.sidebar-item.sidebar-active i {
    color: hsl(var(--accent-primary));
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding-top: 0.5rem;
    border-top: 1px solid hsla(var(--glass-border), 0.3);
}

.sidebar-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: hsla(var(--accent-primary), 0.2);
    border: 2px solid hsla(var(--accent-primary), 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sidebar-avatar:hover {
    border-color: hsl(var(--accent-primary));
    background: hsla(var(--accent-primary), 0.3);
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-avatar-initials {
    font-size: 0.85rem;
    font-weight: 600;
    color: hsl(var(--accent-primary));
}

.burger-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index :  1001;
}

.burger-toggle span {
    width: 100%;
    height: 3px;
    background-color: hsl(var(--text-primary));
    border-radius: 10px;
    transition: all 0.3s var(--ease-out-expo);
    transform-origin: left center;
}

.burger-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
}

.burger-toggle.active span:nth-child(2) {
    width: 0%;
    opacity: 0;
}

.burger-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
}

/* Background Ornament */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, hsla(var(--accent-primary), 0.2) 0%, transparent 70%);
    filter: blur(80px);
    z-index :  -1;
}

.hero-content {
    max-width: 600px;
}

h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

p.lead {
    font-size: 1.25rem;
    color: hsl(var(--text-secondary));
    margin-bottom: 2.5rem;
}

.btn-ghost {
    background: none;
    border: none;
    color: hsl(var(--text-secondary));
}

.btn-ghost:hover {
    color: hsl(var(--text-primary));
    background: hsla(var(--glass-bg), 0.2);
}

.nav-active {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    color: hsl(var(--text-primary));
    border-bottom: 2px solid hsl(var(--accent-primary));
}

/* Sidebar Submenu - "Autres" */
.sidebar-group {
    position: relative;
    width: 100%;
}

.sidebar-submenu {
    position: fixed;
    background: hsla(var(--glass-bg), 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid hsla(var(--glass-border), 0.3);
    border-radius: var(--radius-md);
    width: 160px;
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: auto;
    max-height: calc(100vh - 16px);
    overflow-y: auto;
}

.sidebar-group:hover .sidebar-submenu {
    visibility: visible;
    opacity: 1;
}

.sidebar-submenu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 10px 16px;
    color: hsl(var(--text-secondary));
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.sidebar-submenu .dropdown-item:hover {
    background: hsla(var(--accent-primary), 0.1);
    color: hsl(var(--text-primary));
    padding-left: 20px;
}

.sidebar-submenu .dropdown-item.nav-active {
    background: hsla(var(--accent-primary), 0.15);
    color: hsl(var(--text-primary));
    border: none;
    border-left: 3px solid hsl(var(--accent-primary));
    padding-left: 13px;
}

.sidebar-submenu .dropdown-item.nav-active i {
    color: hsl(var(--accent-primary));
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 12px 16px !important;
    color: hsl(var(--text-secondary));
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: hsla(var(--accent-primary), 0.1);
    color: hsl(var(--text-primary));
    padding-left: 20px;
}

.dropdown-item.nav-active {
    background: hsla(var(--accent-primary), 0.15);
    color: hsl(var(--text-primary));
    border: none;
    border-left: 3px solid hsl(var(--accent-primary));
    padding-left: 13px !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-entrance {
    animation: fadeInUp 0.6s var(--ease-out-expo) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-150 {
    animation-delay: 0.15s;
}

.delay-200 {
    animation-delay: 0.2s;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: hsl(var(--text-secondary));
    font-size: 0.9rem;
}

input[type="text"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: hsla(var(--glass-bg), 0.6);
    border: 1px solid hsla(var(--glass-border), 0.45);
    border-radius: var(--radius-md);
    color: hsl(var(--text-primary));
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

input[type="text"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    border-color: hsl(var(--accent-primary));
    box-shadow: 0 0 0 3px hsla(var(--accent-primary), 0.18);
    background: hsla(var(--glass-bg), 0.85);
}

select {
    appearance: none;
    -webkit-appearance: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a0a8c0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 14px center / 16px 16px;
    background-color: hsla(var(--glass-bg), 0.6);
    padding-right: 2.75rem;
    cursor: pointer;
}

select:focus {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237c6ff7' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 14px center / 16px 16px;
    background-color: hsla(var(--glass-bg), 0.85);
}

input[type="date"] {
    padding-left: 2.75rem;
    color-scheme: dark;
    cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
}

.date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.date-input-wrapper .date-icon {
    position: absolute;
    left: 0.9rem;
    pointer-events: none;
    font-size: 0.85rem;
    color: hsl(var(--accent-primary));
    z-index :  1;
}

.date-input-wrapper input[type="date"]:not(:placeholder-shown),
.date-input-wrapper input[type="date"][value]:not([value=""]) {
    border-color: hsla(var(--accent-primary), 0.4);
}

textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: hsla(var(--bg-color), 0.4);
    border: 1px solid hsla(var(--glass-border), 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    gap: 0.75rem;
}

.checkbox-item:hover {
    background: hsla(var(--bg-color), 0.6);
    border-color: hsla(var(--accent-primary), 0.5);
    transform: translateY(-2px);
}

.checkbox-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid hsla(var(--text-secondary), 0.5);
    border-radius: 6px;
    display: grid;
    place-content: center;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: pointer;
    background-color: hsla(var(--bg-color), 0.5);
    flex-shrink: 0;
}

.checkbox-item input[type="checkbox"]::before {
    content: "\f00c";
    /* FontAwesome check */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
    color: white;
    transform: scale(0);
    transition: transform 0.2s ease;
}

.checkbox-item input[type="checkbox"]:checked {
    background-color: hsl(var(--accent-primary));
    border-color: hsl(var(--accent-primary));
    box-shadow: 0 4px 12px hsla(var(--accent-primary), 0.4);
}

.checkbox-item input[type="checkbox"]:checked::before {
    transform: scale(1);
}

/* Radio button styling (Vélo / Roues forms) */
.checkbox-item input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid hsla(var(--text-secondary), 0.5);
    border-radius: 50%;
    display: grid;
    place-content: center;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: pointer;
    background-color: hsla(var(--bg-color), 0.5);
    flex-shrink: 0;
}

.checkbox-item input[type="radio"]::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    transform: scale(0);
    transition: transform 0.2s ease;
}

.checkbox-item input[type="radio"]:checked {
    background-color: hsl(var(--accent-primary));
    border-color: hsl(var(--accent-primary));
    box-shadow: 0 4px 12px hsla(var(--accent-primary), 0.4);
}

.checkbox-item input[type="radio"]:checked::before {
    transform: scale(1);
}

/* Highlight parent label when checked (optional, requires :has support or JS, sticking to input style for now) */
.checkbox-item:has(input:checked),
.checkbox-item.parent-is-active {
    background: hsla(var(--accent-primary), 0.1);
    border-color: hsla(var(--accent-primary), 0.3);
}

.checkbox-item span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex :  1;
    min-width: 0;
    line-height: 1.3;
}

/* Ingredient sections (recipe form) */
.ingredient-section {
    margin-top: 1.25rem;
}

.ingredient-section:first-child {
    margin-top: 0;
}

.ingredient-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: hsl(var(--text-secondary));
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid hsla(var(--glass-border), 0.25);
}

/* Ingredient checkboxes with quantity field (recipe form) */
.checkbox-group--quantities {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.checkbox-group--quantities .checkbox-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    cursor: default;
}

.checkbox-group--quantities .checkbox-inner {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.quantity-input {
    display: none;
    width: 100%;
    padding: 6px 10px;
    background: hsla(var(--bg-color), 0.6);
    border: 1px solid hsla(var(--glass-border), 0.4);
    border-radius: 8px;
    color: hsl(var(--text-primary));
    font-size: 0.8rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.quantity-input::placeholder {
    color: hsl(var(--text-secondary));
    opacity: 0.7;
}

.quantity-input:focus {
    outline: none;
    border-color: hsla(var(--accent-primary), 0.5);
}

.checkbox-item:has(input[type="checkbox"]:checked) .quantity-input {
    display: block;
}

/* Lists & Tables */
.data-list {
    margin-top: 2rem;
    display: grid;
    gap: 1rem;
}

.data-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: 1px solid hsla(var(--glass-border), 0.2);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    gap: 0.75rem;
}

.item-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 0 0 auto;
    white-space: nowrap;
}

.item-actions form {
    display: flex;
    align-items: center;
}

.data-item:hover {
    transform: translateX(5px);
    border-color: hsla(var(--glass-border), 0.4);
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: hsl(var(--text-secondary));
    cursor: pointer;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-action i {
    font-size: 1rem;
}

.btn-action:hover {
    color: #ff4757;
    background: hsla(350, 80%, 60%, 0.1);
}

.btn-action-view {
    color: #3498db;
}

.btn-action-view:hover {
    color: #3498db;
    background: hsla(204, 70%, 53%, 0.1);
}

.btn-action-edit {
    color: #f39c12;
}

.btn-action-edit:hover {
    color: #f39c12;
    background: hsla(35, 100%, 50%, 0.1);
}

.btn-action-delete {
    color: #e74c3c;
}

.btn-action-delete:hover {
    color: #e74c3c;
    background: hsla(350, 80%, 60%, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header .title-group {
    display: flex;
    flex-direction: column;
}

.grid-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.form-card {
    display: none;
    width: 100%;
}

.form-card.visible {
    display: block;
}

.list-section {
    width: 100%;
    display: block;
}

/* Search bar */
.search-wrapper {
    position: relative;
    margin-bottom: 0;
}

.search-wrapper .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: hsl(var(--text-secondary));
    pointer-events: none;
    font-size: 0.9rem;
}

.search-wrapper input[type="search"] {
    width: 100%;
    padding: 0.75rem 2.75rem 0.75rem 3rem;
    background: hsla(var(--glass-bg), 0.3);
    border: 1px solid hsla(var(--glass-border), 0.3);
    border-radius: var(--radius-md);
    color: hsl(var(--text-primary));
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.search-wrapper input[type="search"]:focus {
    outline: none;
    border-color: hsl(var(--accent-primary));
    background: hsla(var(--glass-bg), 0.5);
}

.search-wrapper input[type="search"]::placeholder {
    color: hsl(var(--text-secondary));
    opacity: 0.7;
}

.search-wrapper input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

.search-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: hsl(var(--text-secondary));
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    font-size: 0.8rem;
}

.search-clear:hover {
    color: hsl(var(--text-primary));
}

.search-no-results {
    text-align: center;
    padding: 2rem 1rem;
    color: hsl(var(--text-secondary));
    font-size: 0.95rem;
    display: none;
}

.ingredients-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: flex-start;
}

.card {
    background: transparent;
    border: 1px solid hsla(var(--glass-border), 0.3);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 50px;
    background: hsla(var(--accent-secondary), 0.15);
    color: hsl(var(--accent-secondary));
    font-size: 0.8rem;
    margin-right: 4px;
    border: 1px solid transparent;
}

.badge-ingredient {
    background: hsla(190, 100%, 60%, 0.15);
    color: hsl(190, 100%, 60%);
    border-color: hsla(190, 100%, 60%, 0.1);
}

.badge-recipe {
    background: hsla(250, 100%, 70%, 0.15);
    color: hsl(250, 100%, 75%);
    border-color: hsla(250, 100%, 70%, 0.1);
}

.badge-forbidden {
    background: hsla(0, 70%, 60%, 0.15);
    color: #ff6b6b;
    border-color: hsla(0, 70%, 60%, 0.1);
}

.badge i {
    margin-right: 0.35rem;
}

.badge-quantity {
    margin-left: 0.35rem;
    opacity: 0.7;
    font-size: 0.85em;
    font-weight: 400;
}

/* Protein version groups (recipe form) */
.protein-version {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: hsla(250, 100%, 70%, 0.05);
    border: 1px solid hsla(250, 100%, 70%, 0.15);
    border-radius: var(--radius-md);
}

.protein-version-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.protein-version-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: hsl(250, 100%, 75%);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.btn-remove-version {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: none;
    border: 1px solid hsla(0, 70%, 60%, 0.3);
    border-radius: 50%;
    color: hsla(0, 70%, 60%, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.btn-remove-version:hover {
    background: hsla(0, 70%, 60%, 0.15);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* Protein versions display in recipe cards */
.protein-versions-display {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.protein-version-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.protein-version-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: hsl(250, 100%, 75%);
    background: hsla(250, 100%, 70%, 0.12);
    border: 1px solid hsla(250, 100%, 70%, 0.2);
    border-radius: 50px;
    padding: 2px 10px;
    white-space: nowrap;
}

.badge-protein {
    background: hsla(250, 100%, 70%, 0.15);
    color: hsl(250, 100%, 78%);
    border-color: hsla(250, 100%, 70%, 0.15);
}

/* Recipe Detail Panel */
.recipe-panel-overlay {
    display: none !important;
    position: fixed;
    inset: 0;
    background: hsla(0, 0%, 0%, 0.5);
    backdrop-filter: blur(4px);
    z-index :  1010;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.recipe-panel-overlay.open {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: all !important;
}

.recipe-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 40%;
    height: 100vh;
    background: hsl(var(--bg-color));
    border-left: 1px solid hsla(var(--glass-border), 0.3);
    z-index :  1011;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out-expo);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.recipe-panel-overlay.open .recipe-panel {
    transform: translateX(0);
}

.recipe-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid hsla(var(--glass-border), 0.2);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index :  10;
    background: hsl(var(--bg-color));
}

.recipe-panel-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: hsl(var(--text-primary));
}

.recipe-panel-close {
    background: none;
    border: none;
    color: hsl(var(--text-secondary));
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.35rem;
    transition: color 0.2s ease;
}

.recipe-panel-close:hover {
    color: hsl(var(--text-primary));
}

.recipe-panel-body {
    flex :  1;
    overflow-y: auto;
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.recipe-panel-footer {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid hsla(var(--glass-border), 0.2);
    flex-shrink: 0;
}

/* Document upload modal form - compact layout */
#doc-upload-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#doc-upload-form .form-group {
    margin-bottom: 0;
}

#doc-upload-form .form-group label {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

#doc-upload-form input[type="text"],
#doc-upload-form input[type="file"] {
    font-size: 0.9rem;
}

#doc-upload-form .file-upload-wrapper {
    padding: 0.75rem 1rem;
}

#doc-upload-form .file-upload-label {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

#doc-upload-form .text-secondary {
    font-size: 0.7rem !important;
}

.rp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rp-section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.rp-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: hsl(var(--text-secondary));
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.rp-ingredients {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.rp-instructions {
    font-size: 0.9rem;
    color: hsl(var(--text-secondary));
    line-height: 1.6;
    margin: 0;
}

/* Confirmation Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: hsla(0, 0%, 0%, 0.7);
    backdrop-filter: blur(8px);
    z-index :  1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.visible {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: hsla(var(--glass-bg), 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid hsla(var(--glass-border), 0.4);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px hsla(0, 0%, 0%, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s var(--ease-out-expo);
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-header i {
    font-size: 2rem;
    color: #ff6b6b;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: hsl(var(--text-primary));
}

.modal-overlay p {
    color: hsl(var(--text-secondary));
    margin-bottom: 2rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-secondary {
    background: hsla(var(--glass-bg), 0.5);
    border: 1px solid hsla(var(--glass-border), 0.5);
    color: #ffffff;
}

.btn-secondary:hover {
    background: hsla(var(--glass-bg), 0.7);
}

/* Close Button */
.btn-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: hsla(var(--accent-primary), 0.15);
    border: none;
    border-radius: 8px;
    color: hsl(var(--accent-primary));
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    line-height: 1;
    text-decoration: none;
    flex-shrink: 0;
    padding: 0;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
    box-shadow: 0 10px 30px -10px hsla(0, 70%, 60%, 0.5);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -12px hsla(0, 70%, 60%, 0.6);
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid hsla(var(--glass-border), 0.2);
    text-align: center;
}

footer p {
    color: hsl(var(--text-secondary));
    font-size: 0.9rem;
}

footer a {
    color: hsl(var(--text-primary));
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: hsl(var(--accent-primary));
}

/* Responsive Design */
@media (max-width: 1024px) {
    h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    header {
        position: fixed;
        padding: 0;
        height: var(--header-height);
        background: hsla(var(--bg-color), 0.9);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid hsla(var(--glass-border), 0.2);
    }

    /* Section anchors - horizontal scroll on mobile */
    .section-anchors {
        top: 70px !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
    }

    .section-anchors a {
        flex-shrink: 0;
    }

    /* Adjust scroll margin for mobile */
    .card[id^="section-"] {
        scroll-margin-top: 130px !important;
    }

    .container {
        padding: 0 1rem;
    }

    header .container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: 100%;
    }

    .logo {
        justify-content: flex-start;
        width: auto;
    }

    .burger-toggle {
        display: flex;
    }

    nav {
        display: flex;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        max-height: 0;
        visibility: hidden;
        opacity: 0;
        background: hsla(var(--bg-color), 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 0;
        gap: 0;
        overflow: hidden;
        transition: all 0.5s var(--ease-out-expo);
        border-bottom: 0 solid hsla(var(--glass-border), 0.2);
        z-index :  999;
    }

    nav.mobile-tabbar {
        max-height: none !important;
        visibility: visible !important;
        opacity: 1 !important;
        top: auto !important;
    }

    nav.active {
        max-height: 100vh;
        visibility: visible;
        opacity: 1;
        padding: 2rem 1.5rem;
        border-bottom: 1px solid hsla(var(--glass-border), 0.2);
    }

    nav .btn,
    nav .nav-active {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        border-radius: 12px;
        margin-bottom: 0.5rem;
        border-bottom: none;
    }

    nav .nav-active {
        background: hsla(var(--accent-primary), 0.12);
        border: 1px solid hsla(var(--accent-primary), 0.3);
    }

    nav a span {
        font-size: 0.95rem;
    }

    /* Dropdown menu on mobile */
    .nav-dropdown {
        width: 100%;
        position: static;
    }

    .nav-dropdown-toggle {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        border-radius: 12px;
        margin-bottom: 0.5rem;
    }

    .nav-dropdown-menu {
        position: static;
        background: none;
        backdrop-filter: none;
        border: none;
        min-width: auto;
        margin-top: 0;
        padding: 0;
        box-shadow: none;
        opacity: 1;
        transform: none;
        pointer-events: all;
        display: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-dropdown.active .nav-dropdown-menu {
        display: flex;
        max-height: 500px;
    }

    .dropdown-item {
        width: 100%;
        justify-content: center;
        padding: 1rem !important;
        border-radius: 12px;
        margin-bottom: 0.5rem;
        border: 1px solid hsla(var(--glass-border), 0.3) !important;
    }

    .dropdown-item.nav-active {
        background: hsla(var(--accent-primary), 0.12);
        border: 1px solid hsla(var(--accent-primary), 0.3) !important;
        border-left: 1px solid hsla(var(--accent-primary), 0.3) !important;
        padding-left: 1rem !important;
    }

    .dropdown-item:hover {
        padding-left: 1rem !important;
        background: hsla(var(--accent-primary), 0.08);
    }

    main {
        padding-top: calc(var(--header-height) + 0.75rem) !important;
    }

    .hero {
        min-height: auto;
        padding: 4rem 0;
    }

    h1 {
        font-size: 2.2rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-header button {
        width: 100%;
    }

    .grid-layout {
        align-items: stretch;
    }

    .form-card {
        flex :  1 1 auto;
    }

    .data-item {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }

    .data-item .item-actions {
        position: static;
        width: 100%;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 0.5rem;
        padding-top: 0.4rem;
        border-top: 1px solid hsla(var(--glass-border), 0.25);
    }

    .data-item > div:first-child {
        padding-right: 0;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .recipe-panel {
        width: 100%;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    .card {
        padding: 1.5rem;
    }

    .logo span {
        font-size: 1.25rem;
    }
}

/* ── Recipes Button ── */
.btn-recipes {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 12px 22px;
    background: hsla(190, 80%, 45%, 0.15);
    border: 1px solid hsla(190, 80%, 50%, 0.4);
    border-radius: 100px;
    color: hsl(190, 80%, 75%);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, transform 0.2s;
}

.btn-recipes:hover {
    background: hsla(190, 80%, 45%, 0.28);
    border-color: hsl(190, 80%, 60%);
    transform: translateY(-1px);
}

/* ── Meteo Button ── */
.btn-meteo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 12px 22px;
    background: hsla(45, 90%, 50%, 0.12);
    border: 1px solid hsla(45, 90%, 55%, 0.4);
    border-radius: 100px;
    color: hsl(45, 90%, 75%);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, transform 0.2s;
}

.btn-meteo:hover {
    background: hsla(45, 90%, 50%, 0.25);
    border-color: hsl(45, 90%, 65%);
    transform: translateY(-1px);
}

/* ── Planning Button ── */
.btn-planning {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 12px 22px;
    background: hsla(150, 70%, 45%, 0.15);
    border: 1px solid hsla(150, 70%, 50%, 0.4);
    border-radius: var(--radius-md);
    color: hsl(150, 70%, 75%);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, transform 0.2s;
    text-decoration: none;
}

.btn-planning:hover {
    background: hsla(150, 70%, 45%, 0.28);
    border-color: hsl(150, 70%, 65%);
    transform: translateY(-1px);
}

/* ── Planning Button - Documents ── */
.btn-planning-docs {
    background: hsla(210, 70%, 50%, 0.15);
    border-color: hsla(210, 70%, 55%, 0.4);
    color: hsl(210, 80%, 75%);
}

.btn-planning-docs:hover {
    background: hsla(210, 70%, 50%, 0.28);
    border-color: hsl(210, 80%, 65%);
}

/* ── GPX Button ── */
.btn-gpx {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 12px 22px;
    background: hsla(280, 60%, 50%, 0.15);
    border: 1px solid hsla(280, 60%, 55%, 0.4);
    border-radius: 100px;
    color: hsl(280, 80%, 80%);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, transform 0.2s;
}

.btn-gpx:hover {
    background: hsla(280, 60%, 50%, 0.28);
    border-color: hsl(280, 70%, 65%);
    transform: translateY(-1px);
}

.gpx-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: hsl(280, 70%, 60%);
    color: white;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ── GPX Panel Doc List ── */
.gpx-docs-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.gpx-doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: hsla(var(--glass-bg), 0.4);
    border: 1px solid hsla(var(--glass-border), 0.2);
    border-radius: var(--radius-md);
}

.gpx-doc-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.meteo-doc-item {
    border: 1px solid hsla(var(--glass-border), 0.2);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.meteo-doc-item .gpx-doc-item {
    border: none;
    border-radius: 0;
}

.meteo-img-wrapper {
    display: block;
}

.meteo-img {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    background: hsla(var(--glass-bg), 0.6);
    cursor: zoom-in;
}

/* ── Document Bank ── */
.file-upload-wrapper {
    display: flex;
    flex-direction: column;
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    outline: none !important;
    box-shadow: none !important;
}

.file-upload-wrapper input[type="file"]:focus,
.file-upload-wrapper input[type="file"]:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.file-upload-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: hsla(var(--glass-bg), 0.4);
    border: 1px dashed hsla(var(--glass-border), 0.6);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    color: hsl(var(--text-secondary));
    transition: border-color 0.3s, background 0.3s;
    word-break: break-all;
}

.file-upload-label:hover {
    border-color: hsl(var(--accent-primary));
    background: hsla(var(--accent-primary), 0.08);
    color: hsl(var(--text-primary));
}

.file-upload-label i {
    font-size: 1.2rem;
    color: hsl(var(--accent-primary));
    flex-shrink: 0;
}

/* ── Horaires Mode Tabs ── */
.horaire-mode-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}

.horaire-mode-btn {
    padding: 0.38rem 0.9rem;
    border-radius: 100px;
    border: 1px solid hsla(var(--glass-border), 0.4);
    background: hsla(var(--glass-bg), 0.3);
    color: hsl(var(--text-secondary));
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.horaire-mode-btn:hover {
    border-color: hsla(var(--accent-primary), 0.5);
    color: hsl(var(--text-primary));
}

.horaire-mode-btn.active {
    background: hsla(var(--accent-primary), 0.14);
    border-color: hsla(var(--accent-primary), 0.5);
    color: hsl(var(--accent-primary));
}

.horaire-badge--athletes {
    background: hsla(160, 60%, 40%, 0.12) !important;
    border-color: hsla(160, 60%, 40%, 0.3) !important;
    color: #1abc9c !important;
}

.horaire-badge--staff {
    background: hsla(280, 60%, 50%, 0.12) !important;
    border-color: hsla(280, 60%, 50%, 0.3) !important;
    color: #8e44ad !important;
}

/* ── Horaires Time Picker ── */
.horaire-time-picker {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    position: relative;
    z-index :  10;
}

.horaire-time-select {
    flex :  1;
    min-width: 110px;
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

.horaire-time-sep {
    font-weight: 800;
    font-size: 1.2rem;
    color: hsl(var(--text-secondary));
    flex-shrink: 0;
    line-height: 1;
    margin-bottom: 1px;
}

/* ── Fix: Allow time pickers dropdown to expand ── */
#panel-horaires .recipe-panel-body {
    padding-bottom: 15rem;
}

/* ── Horaires Timeline ── */
.horaires-timeline {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.horaire-row {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.horaire-timeline-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 14px;
    padding-top: 0.9rem;
}

.horaire-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.horaire-vline {
    width: 2px;
    flex :  1;
    min-height: 16px;
    background: hsla(var(--glass-border), 0.35);
    margin-top: 5px;
    border-radius: 1px;
}

.horaire-card {
    flex :  1;
    min-width: 0;
    margin-bottom: 0.9rem;
    padding: 0.7rem 0.9rem;
    background: hsla(var(--glass-bg), 0.4);
    border: 1px solid hsla(var(--glass-border), 0.2);
    border-left: 3px solid transparent;
    border-radius: 0 10px 10px 0;
    transition: background 0.2s;
}

.horaire-card:hover {
    background: hsla(var(--glass-bg), 0.65);
}

.horaire-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.horaire-time {
    font-size: 1rem;
    font-weight: 700;
    color: hsl(var(--accent-secondary));
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.horaire-type {
    font-size: 0.87rem;
    font-weight: 600;
    color: hsl(var(--text-primary));
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.18rem;
}

.horaire-type i {
    font-size: 0.8rem;
    flex-shrink: 0;
}

.horaire-libelle {
    font-size: 0.8rem;
    color: hsl(var(--text-secondary));
    margin-top: 0.15rem;
    font-style: italic;
}

.horaire-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.horaire-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    background: hsla(var(--accent-primary), 0.1);
    border: 1px solid hsla(var(--accent-primary), 0.2);
    border-radius: 100px;
    font-size: 0.73rem;
    font-weight: 600;
    color: hsl(var(--accent-primary));
    white-space: nowrap;
}

.horaire-all {
    display: block;
    font-size: 0.78rem;
    color: hsl(var(--text-secondary));
    font-style: italic;
    margin-top: 0.4rem;
}

/* ── Toggle Switch (Course) ── */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    cursor: pointer;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: hsla(var(--glass-bg), 0.8);
    border: 1px solid hsla(var(--glass-border), 0.4);
    border-radius: 28px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background: hsl(var(--text-secondary));
    border-radius: 50%;
    transition: transform 0.3s var(--ease-out-expo), background 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background: hsl(var(--accent-primary));
    border-color: hsl(var(--accent-primary));
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
    background: white;
    box-shadow: 0 0 10px hsla(var(--accent-primary), 0.4);
}

/* Tagify Customization */
.tagify {
    background: hsla(var(--glass-bg), 0.8) !important;
    border: 1.5px solid hsla(var(--glass-border), 0.6) !important;
    border-radius: var(--radius-md) !important;
    padding: 10px 12px !important;
    min-height: 44px;
    transition: all 0.3s ease !important;
    font-size: 1rem !important;
    line-height: 1.4;
}

.tagify:focus-within {
    border-color: hsl(var(--accent-primary)) !important;
    background: hsla(var(--glass-bg), 0.95) !important;
    box-shadow: 0 0 0 3px hsla(var(--accent-primary), 0.25) !important;
}

.tagify__tag {
    background: linear-gradient(135deg, hsla(var(--accent-primary), 0.25), hsla(var(--accent-secondary), 0.15)) !important;
    color: hsl(var(--text-primary)) !important;
    border: 1px solid hsla(var(--accent-primary), 0.5) !important;
    border-radius: 6px !important;
    padding: 6px 8px !important;
    font-weight: 500;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center;
    gap: 6px;
}

.tagify__tag:hover {
    background: linear-gradient(135deg, hsla(var(--accent-primary), 0.35), hsla(var(--accent-secondary), 0.25)) !important;
    border-color: hsl(var(--accent-primary)) !important;
    transform: translateY(-1px);
}

.tagify__tag > x {
    cursor: pointer;
    font-size: 1.2em;
    color: hsl(var(--accent-primary)) !important;
    opacity: 0.8;
    transition: all 0.2s ease !important;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    flex-shrink: 0;
}

.tagify__tag > x:hover {
    color: hsl(var(--accent-secondary)) !important;
    opacity: 1;
    background: hsla(var(--accent-primary), 0.2);
}

.tagify__tag-text {
    flex :  1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tagify__input {
    color: hsl(var(--text-primary)) !important;
    padding: 0 4px !important;
    font-size: 1rem !important;
}

.tagify__input::placeholder {
    color: hsl(var(--text-secondary)) !important;
    opacity: 1;
    font-size: 1rem !important;
}

.tagify__dropdown {
    background: hsla(var(--glass-bg), 0.98) !important;
    backdrop-filter: blur(10px) !important;
    border: 1.5px solid hsla(var(--accent-primary), 0.4) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important;
    margin-top: 8px;
    padding: 8px 0 !important;
    z-index :  1000 !important;
    position: absolute !important;
    width: calc(100% - 4px) !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

.tagify__dropdown__item {
    color: hsl(var(--text-primary)) !important;
    padding: 12px 16px !important;
    font-size: 0.95rem;
    transition: all 0.2s ease !important;
    cursor: pointer;
    border-left: 3px solid transparent;
    background: transparent;
}

.tagify__dropdown__item:hover {
    background: hsla(var(--accent-primary), 0.2) !important;
    border-left-color: hsl(var(--accent-primary)) !important;
    padding-left: 20px !important;
}

.tagify__dropdown__item--active {
    background: hsla(var(--accent-primary), 0.25) !important;
    border-left-color: hsl(var(--accent-primary)) !important;
    color: hsl(var(--accent-primary)) !important;
    padding-left: 20px !important;
}

/* Scrollbar styling for dropdown */
.tagify__dropdown::-webkit-scrollbar {
    width: 6px;
}

.tagify__dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.tagify__dropdown::-webkit-scrollbar-thumb {
    background: hsla(var(--accent-primary), 0.3);
    border-radius: 3px;
}

.tagify__dropdown::-webkit-scrollbar-thumb:hover {
    background: hsla(var(--accent-primary), 0.5);
}

/* Ingredient Tags */
.ingredient-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    background: hsla(var(--accent-primary), 0.15);
    color: hsl(var(--accent-primary));
    border: 1px solid hsla(var(--accent-primary), 0.3);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ingredient-tag:hover {
    background: hsla(var(--accent-primary), 0.25);
    border-color: hsla(var(--accent-primary), 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px hsla(var(--accent-primary), 0.15);
}

/* Transport Button Styles */
.btn-planning-transports {
    background: hsla(30, 90%, 50%, 0.15);
    border-color: hsla(30, 90%, 55%, 0.4);
    color: hsl(30, 90%, 75%);
}

.btn-planning-transports:hover {
    background: hsla(30, 90%, 50%, 0.28);
    border-color: hsl(30, 90%, 65%);
    transform: translateY(-1px);
}

/* ── Athlete card circle: image + icon centering fix ── */
.athlete-selection-card > div:first-child {
    position: relative !important;
    display: block !important;
}

.athlete-selection-card > div:first-child img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center top;
}

.athlete-selection-card > div:first-child i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ===== LOGIN PAGE ===== */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, hsl(var(--bg-color)), hsl(var(--bg-float)));
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 3rem 2rem;
    background: hsla(var(--glass-bg), 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid hsla(var(--glass-border), 0.3);
    border-radius: 24px;
    box-shadow: 0 20px 60px hsla(0, 0%, 0%, 0.3);
    animation: fadeInUp 0.6s var(--ease-out-expo);
}

.login-logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 1rem 0 0.5rem;
}

.login-subtitle {
    color: hsl(var(--text-secondary));
    font-size: 0.95rem;
    margin: 0;
}

.login-form {
    animation: fadeInUp 0.6s var(--ease-out-expo) 0.1s backwards;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form .form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: hsl(var(--text-primary));
    font-size: 0.95rem;
    font-weight: 500;
}

.login-form input[type="email"] {
    width: 100%;
    padding: 1rem 1.25rem;
    background: hsla(var(--glass-bg), 0.6);
    border: 1px solid hsla(var(--glass-border), 0.4);
    border-radius: 12px;
    color: hsl(var(--text-primary));
    font-size: 1rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 8px hsla(0, 0%, 0%, 0.2);
}

.login-form input[type="email"]::placeholder {
    color: hsl(var(--text-secondary));
    opacity: 0.7;
}

.login-form input[type="email"]:focus {
    outline: none;
    background: hsla(var(--glass-bg), 0.8);
    border-color: hsla(var(--accent-primary), 0.6);
    box-shadow: inset 0 2px 8px hsla(0, 0%, 0%, 0.2),
                0 0 20px hsla(var(--accent-primary), 0.2);
}

.login-form button[type="submit"] {
    width: 100%;
}

/* Email input styling for people form */
input.email-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: hsla(var(--glass-bg), 0.6);
    border: 1px solid hsla(var(--glass-border), 0.4);
    border-radius: 12px;
    color: hsl(var(--text-primary));
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 8px hsla(0, 0%, 0%, 0.2);
}

input.email-input::placeholder {
    color: hsl(var(--text-secondary));
    opacity: 0.7;
}

input.email-input:focus {
    outline: none;
    background: hsla(var(--glass-bg), 0.8);
    border-color: hsla(var(--accent-primary), 0.6);
    box-shadow: inset 0 2px 8px hsla(0, 0%, 0%, 0.2),
                0 0 20px hsla(var(--accent-primary), 0.2);
}

.login-message {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    animation: fadeInUp 0.6s var(--ease-out-expo);
}

.login-message i {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.login-message--error {
    background: hsla(0, 100%, 50%, 0.12);
    color: hsl(0, 100%, 75%);
    border: 1px solid hsla(0, 100%, 50%, 0.25);
}

.login-message--success {
    background: hsla(120, 100%, 50%, 0.12);
    color: hsl(120, 100%, 60%);
    border: 1px solid hsla(120, 100%, 50%, 0.25);
}

.login-message--error i {
    color: hsl(0, 100%, 75%);
}

.login-message--success i {
    color: hsl(120, 100%, 60%);
}

/* ===== USER INFO IN HEADER ===== */

.user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: hsl(var(--text-primary));
    font-weight: 500;
    font-size: 0.95rem;
}

.user-info .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Number input styling - hide native spinners everywhere */
input[type="number"] {
    text-align: center;
}

/* Hide native number input spinners (Chrome, Safari, Edge) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Hide native number input spinner (Firefox) */
input[type="number"] {
    -moz-appearance: textfield;
}

/* ─────── RBAC Permission System Styles ─────── */

/* Permission matrix checkbox */
.permission-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid hsla(var(--text-secondary), 0.4);
    border-radius: 6px;
    cursor: pointer;
    background: hsla(var(--bg-color), 0.5);
    transition: all 0.2s ease;
    display: grid;
    place-content: center;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: white;
    margin: 0 auto;
}

.permission-checkbox::before {
    content: "\f00c";
    transform: scale(0);
    transition: transform 0.15s ease;
}

.permission-checkbox:checked {
    background: hsl(var(--accent-primary));
    border-color: hsl(var(--accent-primary));
}

.permission-checkbox:checked::before {
    transform: scale(1);
}

.permission-checkbox:hover:not(:checked) {
    border-color: hsl(var(--accent-primary), 0.6);
}

/* Role tabs */
.role-tab {
    transition: all 0.3s var(--ease-out-expo);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-logo h1 {
        font-size: 2rem;
    }

    .user-info {
        gap: 1rem;
        font-size: 0.85rem;
    }

    .roles-tabs {
        flex-wrap: wrap !important;
    }

    .role-panel {
        font-size: 0.9rem;
    }

    .permission-checkbox {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}

/* Toast notifications animations */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Mobile TopBar */
.mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: hsl(var(--glass-bg));
    border-bottom: 1px solid hsla(var(--glass-border), 0.3);
    display: none;
    align-items: center;
    justify-content: flex-start;
    padding: 0 1rem;
    gap: 1rem;
    z-index :  100;
    contain: layout paint;
    transform: translateZ(0);
    transition: transform 0.3s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.mobile-topbar--hidden {
    transform: translateY(-100%);
}

.topbar-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.topbar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.topbar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: hsl(var(--text-primary));
}

/* Mobile TabBar & Items */
.mobile-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 70px;
    background: hsl(var(--glass-bg));
    border-top: 1px solid hsla(var(--glass-border), 0.3);
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    z-index :  100;
    contain: layout paint;
    transform: translateZ(0);
}

.tabbar-item {
    flex :  1;
    min-width: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: hsl(var(--text-secondary));
    border: none;
    background: none;
    cursor: pointer;
    padding: 8px 8px;
    border-radius: 8px;
    margin: 0 2px;
}

.tabbar-item i {
    font-size: 1.4rem;
    line-height: 1;
}

.tabbar-item span {
    font-size: 0.6rem;
    text-align: center;
    line-height: 1.2;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tabbar-item:hover {
    color: hsl(var(--text-primary));
    background: hsla(var(--accent-primary), 0.15);
}

.tabbar-item.tabbar-active {
    color: hsl(var(--accent-primary));
    background: hsla(var(--accent-primary), 0.2);
}

/* Tabbar "Autres" — bottom sheet */
.tabbar-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.tabbar-sheet-backdrop.visible {
    visibility: visible;
    opacity: 1;
}

.tabbar-submenu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: hsl(var(--bg-color));
    border: 1px solid hsla(var(--glass-border), 0.2);
    border-radius: 20px 20px 0 0;
    padding: 0 0.75rem calc(1rem + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    z-index: 9999;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6);
    visibility: hidden;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    max-height: 70vh;
    overflow-y: auto;
}

.tabbar-sheet-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 0 0.75rem;
}

.tabbar-sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: hsla(var(--glass-border), 0.5);
}

.tabbar-sheet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
}

.tabbar-submenu .dropdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1rem 0.5rem;
    border-radius: var(--radius-sm);
    background: hsla(var(--glass-bg), 0.3);
    border: 1px solid hsla(var(--glass-border), 0.15);
    color: hsl(var(--text-secondary));
    font-size: 0.78rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    box-sizing: border-box;
}

.tabbar-submenu .dropdown-item i {
    font-size: 1.2rem;
}

.tabbar-submenu .dropdown-item span {
    white-space: normal;
    line-height: 1.2;
}

.tabbar-submenu .dropdown-item:hover {
    background: hsla(var(--accent-primary), 0.15);
    color: hsl(var(--text-primary));
}

.tabbar-submenu .dropdown-item.nav-active {
    background: hsla(var(--accent-primary), 0.2);
    color: hsl(var(--accent-primary));
    border-color: hsla(var(--accent-primary), 0.4);
}

/* Dashboard Tabs */
.dashboard-tabs {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.dashtab-content {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

#dashtab-billets {
    width: 100%;
    max-width: none;
}

/* Billet Card Component Classes */
.billet-trip-times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.billet-trip-item {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.billet-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.billet-line i {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    color: hsl(var(--accent-secondary));
}

.billet-line span {
    color: hsl(var(--text-primary));
    font-weight: 400;
}

.billet-line.billet-type span {
    color: hsl(var(--text-primary));
    font-weight: 400;
}

.billet-line.billet-type {
    margin-bottom: 1.25rem;
}

.billet-line.billet-comment span,
.billet-line.billet-airline span {
    color: hsl(var(--text-secondary));
    font-weight: 400;
}

.billet-trip-lines {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.billet-trip-lines .billet-line {
    margin-bottom: 0;
}

.billet-departure,
.billet-arrival {
    align-items: center;
}

.billet-departure > span,
.billet-arrival > span {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.billet-departure .location,
.billet-arrival .location {
    color: hsl(var(--text-primary));
    font-weight: 500;
}

.billet-departure .time,
.billet-arrival .time {
    font-size: 0.85rem;
    color: hsl(var(--text-secondary));
}

.billet-sep {
    color: hsl(var(--text-secondary));
}

.billet-location-time {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.billet-location-time .location {
    color: hsl(var(--text-primary));
    font-weight: 400;
}

.billet-location-time .time {
    font-size: 0.85rem;
    color: hsl(var(--text-secondary));
}

.billet-time-line i {
    font-size: 0.75rem;
    color: hsl(var(--text-secondary));
}

.billet-time-line .time {
    font-size: 0.75rem;
    color: hsl(var(--text-secondary));
}

.billet-files-section {
    margin-top: 0.5rem;
}

.billet-files {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.billet-file-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    background: hsla(200, 80%, 50%, 0.2);
    border: 1px solid hsla(200, 80%, 50%, 0.3);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: hsl(200, 80%, 75%);
    text-decoration: none;
    transition: all 0.2s;
}

.billet-file-link:hover {
    background: hsla(200, 80%, 50%, 0.3);
}

/* Mobile Styles - Only on screens <= 768px */
@media (max-width: 768px) {
    .mobile-topbar {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 60px !important;
        z-index :  100 !important;
        max-height: none !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 0 1rem !important;
        border-bottom: none !important;
        flex-direction: row !important;
        align-items: center !important;
    }

    .mobile-tabbar {
        display: none !important;
    }

    .sidebar {
        display: none !important;
    }

    .page-wrapper {
        margin-left: 0 !important;
        margin-top: 60px !important;
        padding: 0 !important;
        flex-direction: column !important;
    }

    main {
        padding: 1.5rem 1rem 2rem 1rem !important;
        flex :  1;
    }

    .btn-planning {
        padding: 8px 10px;
        font-size: 0.72rem;
        gap: 0.3rem;
    }

    .event-card-title {
        font-size: 1.15rem !important;
    }

    .athletes-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .athlete-selection-card {
        padding: 1.25rem 0.75rem !important;
    }

    .athlete-selection-card > div:first-child {
        width: 90px !important;
        height: 90px !important;
    }

    .athlete-selection-card h3 {
        font-size: 0.9rem !important;
    }

    .event-btn-group {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    .event-btn-group .btn-planning {
        width: 100%;
        justify-content: center;
    }
}

/* Desktop - Hide mobile elements */
@media (min-width: 769px) {
    .mobile-topbar {
        display: none !important;
    }

    .mobile-tabbar {
        display: none !important;
    }

    #tabbar-submenu-overflow {
        display: none !important;
    }
}

/* ─── Mobile Ergonomics — règles complémentaires (≤ 768px) ─── */
@media (max-width: 768px) {

    /* ── Paires de boutons : 2 colonnes → 1 colonne ── */
    .btn-row,
    [class$="-document-buttons"] {
        flex-direction: column !important;
    }

    .toast-container {
        bottom: 1.5rem;
        right: 1rem;
        left: 1rem;
        align-items: stretch;
    }

    .toast {
        max-width: none;
        font-size: 0.9rem;
    }

    /* ── Grille d'ingrédients avec quantités : 1 colonne ── */
    .checkbox-group--quantities {
        grid-template-columns: 1fr;
    }

    /* ── Checkbox group : max 2 colonnes sur mobile ── */
    .checkbox-group {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    /* ── Tableau : cellules plus compactes ── */
    .data-table th,
    .data-table td {
        padding: 0.65rem 0.75rem;
        font-size: 0.85rem;
    }

    /* ── Supprime le hover-translate sur touch (data-item) ── */
    .data-item:hover {
        transform: none;
    }

    /* ── Cibles tactiles minimales (44px) ── */
    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn-action {
        width: 44px;
        height: 44px;
    }

    /* ── Panneau recette plein écran ── */
    .recipe-panel {
        width: 100%;
        border-left: none;
    }

    /* ── Modal actions empilées ── */
    .modal-actions {
        flex-direction: column-reverse;
        gap: 0.5rem;
    }

    .modal-actions .btn,
    .modal-actions .modal-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* ── Connecter login : padding réduit ── */
    .login-card {
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
    }

    .login-logo h1 {
        font-size: 1.8rem;
    }

    /* ── Section anchors : scroll horizontal ── */
    .section-anchors {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .section-anchors::-webkit-scrollbar {
        display: none;
    }
}

/* ─── Très petits écrans (≤ 480px) ─── */
@media (max-width: 480px) {

    /* ── Container : padding latéral minimal ── */
    .container {
        padding: 0 0.875rem;
    }

    /* ── Checkbox group : 1 colonne ── */
    .checkbox-group {
        grid-template-columns: 1fr;
    }

    /* ── Card : padding réduit ── */
    .card {
        padding: 1.25rem 1rem;
    }

    /* ── Tableau : police encore plus petite ── */
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.5rem;
        font-size: 0.8rem;
    }

    /* ── Toasts ── */
    .toast {
        font-size: 0.85rem;
        padding: 10px 14px;
    }
}

