/* ==========================================
   VARIABLES CSS
   ========================================== */

:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #45b7d1;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-start: #ffd2a5;
    --gradient-end: #ff7b72;
    --premium-gradient: linear-gradient(45deg, #ffd700, #ffed4a);
}

[data-theme="dark"] {
    --bg-light: #1a1a1a;
    --bg-white: #2d2d2d;
    --text-dark: #ffffff;
    --text-light: #b0b0b0;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   STYLES DE BASE
   ========================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    transition: all 0.3s ease;
}



/* ==========================================
   NAVIGATION
   ========================================== */

.navbar {
    background: var(--bg-white);
    padding: 1rem 2rem;
    display: flex;
    box-shadow: var(--shadow);
    position: relative;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .navbar {
    background: rgba(45, 45, 45, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}


.nav-container {
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    cursor: pointer;
    padding-right: 20px;
}

.logo-img {
    height: 52px;
    /* adapte selon ton header */
    width: 52px;
    margin-right: 0.15em;
    vertical-align: middle;
    user-select: none;
}


.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(255, 107, 107, 0.1);
    width: 100%;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--bg-light);
}

.premium-btn {
    background: var(--premium-gradient);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.premium-btn:hover {
    transform: translateY(-2px);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================
   CONTENU PRINCIPAL
   ========================================== */

.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* ==========================================
   PAGE D'ACCUEIL
   ========================================== */

.hero {
    background: var(--gradient);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.features {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ==========================================
   BOUTONS
   ========================================== */

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.theme-aware-btn {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 2px solid var(--text-light);
    transition: all 0.3s ease;
}

[data-theme="dark"] .theme-aware-btn {
    background: var(--bg-white);
    /* qui devient sombre en dark mode grâce à :root */
    color: var(--text-dark);
    border-color: var(--text-light);
}

.theme-aware-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}


/* ==========================================
   PAGES
   ========================================== */

.page-header {
    padding: 2rem;
    text-align: center;
    background: var(--bg-white);
    margin-bottom: 2rem;
}

/* ==========================================
   RECETTES
   ========================================== */

.filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.recipe-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.recipe-card:hover {
    transform: translateY(-5px);
}

.recipe-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #ff9a9e, #fecfef);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.badge {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-time {
    background: #e8f5e8;
    color: #2d7d2d;
}

.badge-difficulty {
    background: #fff3cd;
    color: #856404;
}

.badge-premium {
    background: var(--premium-gradient);
    color: var(--text-dark);
}

/* ==========================================
   PLANIFICATEUR DE REPAS
   ========================================== */

/* ==========================================
   PLANIFICATEUR DE REPAS (ULTRA SOBRE)
   ========================================== */

/* === BANNIÈRE DÉGRADÉE DU PLANNING === */
.planner-banner {
    width: 100vw;
    min-height: 190px;
    background: linear-gradient(90deg, #76aaff 0%, #836aff 50%, #a875f7 100%);
    border-radius: 22px;
    margin: 22px auto 0 auto;
    box-shadow: 0 3px 26px 0 rgba(60,70,140,0.07);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    max-width: 99vw;
}

/* Bulle décorative, comme la page Recettes */
.planner-banner::after {
    content: "";
    position: absolute;
    top: -40px; right: 40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle at 40% 60%, #fff 0%, #fff0 75%);
    opacity: 0.15;
    border-radius: 50%;
    filter: blur(2px);
    z-index: 2;
}
.planner-banner-inner {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 2.3rem 2rem 2rem 2rem;
    text-align: center;
    position: relative;
    z-index: 3;
}
.planner-banner-title {
    color: #fff;
    font-size: 2.3rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
    text-shadow: 0 4px 18px #1b164911;
    line-height: 1.12;
}
.planner-banner-desc {
    color: #f6f7fb;
    font-size: 1.13rem;
    margin: 0;
    font-weight: 500;
    opacity: 0.88;
}

/* ==== PLANIFICATEUR ==== */
.planner-container {
    max-width: 1200px;
    margin: 32px auto 0 auto;
    background: var(--bg-white) !important;
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 2.2rem 2.5rem;
    width: 98%;
    z-index: 10;
    position: relative;
    transition: background 0.3s, box-shadow 0.3s;
}

/* Bloc semaine */
.week-selector {
    background: var(--bg-light) !important;
    border-radius: 16px;
    box-shadow: 0 2px 18px 0 rgba(40,40,60,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.3rem;
    margin-bottom: 2.1rem;
    padding: 1.2rem 2.2rem;
    color: var(--text-dark) !important;
    font-size: 1.05rem;
    flex-wrap: wrap;
    border: 1px solid rgba(90,90,110,0.12);
    min-height: 64px;
    position: relative;
    transition: background 0.3s, color 0.3s;
}

.week-selector-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.week-selector-center {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.week-selector-right {
    margin-left: auto;
    font-size: 1.13rem;
    color: #a875f7 !important;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.week-start-selector label {
    color: var(--text-dark) !important;
    margin-right: 0.3rem;
    font-weight: 500;
}
.week-start-selector select {
    background: var(--bg-white) !important;
    border: none;
    border-radius: 10px;
    padding: 0.25rem 1.2rem;
    outline: none;
    color: #a875f7 !important;
    font-weight: 700;
    font-size: 1.04rem;
    box-shadow: 0 1px 6px 0 rgba(40,40,60,0.04);
    transition: background 0.15s;
}
.week-start-selector select:focus {
    background: var(--bg-light);
}

/* =========================
   MEAL SLOTS
   ========================= */
.meal-slot {
    background: transparent;
    border-radius: 16px !important;
    padding: 0.7rem 0.4rem;
    min-height: 64px;
    border: 2px dashed #a875f7 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light) !important;
    font-weight: 500;
    font-size: 1.06rem;
    margin: 0.18rem 0;
    transition: border-color 0.18s, background 0.17s, color 0.13s;
}

.meal-slot:hover {
    border-color: var(--primary-color) !important;
    color: var(--text-dark);
    background: rgba(168,117,247,0.06);
}

.meal-slot.filled {
    background: rgba(168,117,247,0.09);
    color: var(--text-dark);
    border-style: solid;
    border-color: var(--primary-color) !important;
    font-weight: 700;
}

/* =========================
   JOURS DE LA SEMAINE
   ========================= */
.day-header {
    background: transparent !important;
    color: var(--text-dark);
    font-size: 1.17rem;
    font-weight: 800;
    text-align: center;
    padding: 0.7rem 0 0.18rem 0;
    border: none;
    letter-spacing: 0.01em;
    position: relative;
    z-index: 2;
}

/* Grille semaine */
.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.55rem;
    margin-bottom: 1.4rem;
    background: none;
    border-radius: 16px;
    overflow: visible;
    box-shadow: none;
    border: none;
    padding: 0.6rem 0 0.4rem 0;
}

/* Responsive */
@media (max-width: 1050px) {
    .planner-container { padding: 1rem 0.3rem; }
    .week-grid { grid-template-columns: repeat(3, 1fr);}
    .planner-banner-inner { padding: 1.3rem 0.3rem; }
}

@media (max-width: 950px) {
    .week-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
        padding: 1rem 1vw;
        min-height: unset;
    }
    .week-selector-left,
    .week-selector-center,
    .week-selector-right {
        margin-left: 0 !important;
        justify-content: flex-start;
    }
    .week-selector-right {
        padding-top: 0.7rem;
        font-size: 1.09rem;
    }
    .btn.theme-aware-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 800px) {
    .planner-container { padding: 1rem 0.1rem; }
    .week-grid { grid-template-columns: repeat(2, 1fr); }
    .week-selector { flex-direction: column; gap: 0.7rem; }
    .planner-banner-inner { padding: 1.2rem 0.2rem; }
}
@media (max-width: 600px) {
    .planner-container { padding: 0.2rem 0 0.8rem 0; border-radius: 10px;}
    .week-grid { grid-template-columns: 1fr; gap: 0.5rem;}
    .planner-banner-title { font-size: 1.18rem; }
    .day-header { font-size: 1.02rem; }
    .meal-slot { font-size: 0.96rem; }
}

/* =========================
   BOUTONS
   ========================= */
.btn.theme-aware-btn-planning,
#generateShoppingListBtn {
    background: linear-gradient(90deg, #76aaff 0%, #836aff 50%, #a875f7 100%) !important;
    color: #fff;
    font-weight: 700;
    border: none;
    border-radius: 9px;
    padding: 0.65rem 1.3rem;
    box-shadow: 0 1px 5px 0 rgba(97,111,184,0.12);
    font-size: 1.07rem;
    outline: none;
    transition: background 0.15s, color 0.16s, box-shadow 0.17s;
    margin: 0 0.08rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.btn.theme-aware-btn-planning:hover,
#generateShoppingListBtn:hover {
    background: linear-gradient(90deg, #76aaff 0%, #836aff 50%, #a875f7 100%) !important;
    color: #ffe074;
    box-shadow: 0 2px 16px 0 rgba(97,111,184,0.17);
}

.text-center {
    text-align: center;
    margin-top: 2.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

#generateShoppingListBtn {
    margin: 0 auto;
    padding: 0.8rem 2.2rem;
    border-radius: 10px;
    min-width: 320px;
    display: inline-block;
}




/* ==========================================
   LISTE DE COURSES
   ========================================== */

.shopping-layout {
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
    max-width: 1200px;
    width: 100%;
    margin-left: 8%;
}


/* Panneau persistant */
#persistentListPanel {
    background: var(--bg-light, #18191c);
    border-radius: 12px;
    box-shadow: 0 2px 8px #0001;
    border: 1.5px solid var(--primary-color, #ff6577);
    min-width: 260px;
    max-width: 340px;
    margin-left: 80px;
    /* <-- Décale le panel vers la droite */
}

/* Colonne centrale (liste principale) */
.shopping-layout>div:last-child {
    flex: 1 1 600px;
    max-width: 700px;
    /* <-- Limite la largeur totale de la liste */
    min-width: 0;
}

/* ----- Responsive Mobile ----- */
@media (max-width: 900px) {
  .shopping-layout {
    flex-direction: column;
    gap: 1.2rem;
    margin-left: 0;
    max-width: 100vw;
    padding: 0 0.5rem;
  }
  #persistentListPanel {
    max-width: 100%;
    width: 100%;
    margin-left: 10% !important;
    margin-bottom: 1.2rem;
    order: 0;
  }
  .shopping-layout > div:last-child {
    max-width: 100%;
    width: 100%;
    order: 1;
  }
}


.shopping-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    gap: 2.5rem;
    /* espace entre la liste persistante et la liste principale */
}

.shopping-header {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    text-align: center;
}

.shopping-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.ingredients-list {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
}

.ingredient-category {
    margin-bottom: 2rem;
}

.category-header {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ingredient-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bg-light);
}

.ingredient-item:last-child {
    border-bottom: none;
}

.ingredient-checkbox {
    margin-right: 1rem;
}

.ingredient-name {
    flex: 1;
}

.ingredient-quantity {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ==========================================
   COMPTE
   ========================================== */

.account-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.account-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control,
.select.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--bg-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--bg-light);
    color: var(--text-dark) !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

select.form-control {
    width: 100% !important;
    padding: 0.75rem 2.2rem 0.75rem 0.75rem !important;  /* espace à droite pour le chevron */
    border: 2px solid var(--bg-light);
    border-radius: 8px !important;
    font-size: 1rem;
    background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='16' viewBox='0 0 20 20' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7.293 8.293a1 1 0 0 1 1.414 0L10 9.586l1.293-1.293a1 1 0 1 1 1.414 1.414l-2 2a1 1 0 0 1-1.414 0l-2-2a1 1 0 1 1 1.414-1.414z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.9em center;
    background-size: 1.1em;
    color: var(--text-dark) !important;
    background: var(--bg-light) !important;
    transition: border-color 0.3s;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select.form-control:focus {
    border-color: var(--primary-color, #667eea) !important;
    outline: none;
}

select.form-control:disabled {
    color: #bbb !important;
    cursor: not-allowed;
    border-color: #3e3e3e !important;
    background: #232324 !important;
}


/* ==========================================
   BLOG
   ========================================== */

.blog-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

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

.blog-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.blog-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 44vh;
    padding: 4.5rem 1rem 2.5rem 1rem;
    overflow: hidden;
}
.blog-hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 10% 20%, #5451be88 0%, transparent 60%),
                radial-gradient(ellipse at 92% 12%, #f5576c22 0%, transparent 70%),
                linear-gradient(120deg, #292e6c 0%, #764ba2 100%);
    z-index: 1;
}
.blog-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 560px;
    margin: auto;
    text-align: center;
}
.blog-hero-img {
    width: 135px;
    height: 95px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 8px 32px #2225;
    margin-bottom: 2rem;
}
.blog-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #fff;
    line-height: 1.1;
}
.blog-hero .accent {
    color: #f5576c;
}
.hero-desc {
    color: #e2dcf7;
    font-size: 1.1rem;
    margin-bottom: 2.2rem;
}
.blog-hero-search {
    margin-top: 0.8rem;
    display: flex;
    justify-content: center;
    width: 100%;
}
#blogSearch {
    width: 100%;
    max-width: 360px;
    padding: 0.85rem 1.2rem;
    border-radius: 16px;
    border: none;
    background: #2d2854;
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 2px 8px #0002;
    transition: box-shadow 0.18s;
}
#blogSearch:focus {
    outline: 2px solid #f5576c66;
    background: #241f3c;
}


.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 2.2rem;
    width: 100%;
    max-width: 1080px;
    margin: 2.5rem auto 0 auto;
    padding-bottom: 3rem;
}
.blog-card {
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: 0 6px 32px #1b165833;
    overflow: hidden;
    transition: transform 0.23s cubic-bezier(.17,.67,.83,.67), box-shadow 0.23s;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 360px;
    cursor: pointer;
}
.blog-card:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow: 0 18px 50px #2c284966;
}
.blog-image {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    background: #39307c;
    border-radius: 0 0 32px 32px;
}
.blog-card .blog-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 1.4rem 1.2rem 1.2rem 1.2rem;
}
.blog-card h3 {
    font-weight: 700;
    color: #ffe0ea;
    font-size: 1.12rem;
    margin: 0.8rem 0 0.3rem 0;
}
.blog-card .blog-meta {
    color: #a99be3;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.04em;
}
.blog-card p {
    color: #bcb5de;
    font-size: 0.97rem;
    margin-bottom: 1rem;
}
.blog-card .btn-primary {
    background: #f5576c;
    color: #fff;
    border-radius: 8px;
    border: none;
    font-size: 1em;
    padding: 0.55em 1.1em;
    box-shadow: 0 2px 8px #f5576c33;
    transition: background 0.17s;
}
.blog-card .btn-primary:hover {
    background: #d8435d;
}


/* ==========================================
   MODALS ET POPUPS
   ========================================== */

.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 16px;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    width: 100%;

    /* Masquer les barres de défilement */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* Internet Explorer 10+ */
}

.modal-content::-webkit-scrollbar {
    display: none;
    /* Safari et Chrome */
}

/* Styles pour tous les conteneurs scrollables dans les modals */
.modal .modal-content *::-webkit-scrollbar {
    display: none;
}

.modal .modal-content * {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Boutons de fermeture des modals */
.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-dark);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* ==========================================
   PREMIUM
   ========================================== */

.premium-hero {
    background: var(--premium-gradient);
    color: #665600;
    padding: 4rem 2rem 3rem 2rem;
    text-align: center;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 4px 38px #ffd70018;
    position: relative;
    font-family: inherit;
}

.premium-hero h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 0 2px 18px #fff8, 0 2px 24px #ffd70025;
    letter-spacing: -0.01em;
}

.premium-hero p {
    color: #7d6e20;
    opacity: 0.93;
    font-size: 1.18rem;
    font-weight: 600;
}

.premium-features {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.premium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.premium-feature {
    background: var(--bg-white);
    padding: 2.1rem 1.4rem;
    border-radius: 18px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1.5px solid #ffe25980;
    position: relative;
    overflow: hidden;
    transition: box-shadow .13s;
}

.premium-feature .feature-icon {
    font-size: 2.2rem;
    margin-bottom: .8rem;
}

.premium-feature h3 {
    font-size: 1.18rem;
    font-weight: 800;
    margin: .7rem 0 .3rem 0;
    color: #ffc93c;
    letter-spacing: -0.01em;
}

.premium-feature p {
    color: var(--text-light);
    font-size: 1.02rem;
    margin: 0;
}

.premium-feature::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 7px;
    border-radius: 8px;
    background: var(--premium-gradient);
    opacity: 0.16;
}

.pricing-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    border: 2px solid #ffe25950;
    margin-top: 2.8rem;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--premium-gradient);
}

.price {
    font-size: 3rem;
    font-weight: 800;
    color: #ffc93c;
    margin: 1.1rem 0 .8rem 0;
    text-shadow: 0 1px 12px #ffdf607a;
}

.pricing-card h3 {
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 0.7rem 0;
    color: #ffc93c;
}

.pricing-card ul {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 1.4rem;
}

.premium-btn-primary {
    background: linear-gradient(90deg, #ffd700, #ffa751 80%);
    color: #6a5902;
    font-weight: 700;
    border: none;
    padding: 1em 2em;
    border-radius: 2em;
    font-size: 1.05em;
    cursor: pointer;
    box-shadow: 0 2px 8px #ffea7c30;
    transition: background .18s, box-shadow .15s;
}

.premium-btn-primary:hover {
    background: linear-gradient(90deg, #ffe259, #ffc45e 90%);
    box-shadow: 0 5px 18px #ffd70055;
}

[data-theme="dark"] .premium-hero {
    background: linear-gradient(100deg, #3d3408 0%, #827015 100%);
    color: #ffe382;
}

[data-theme="dark"] .premium-feature,
[data-theme="dark"] .pricing-card {
    background: var(--bg-white);
    /* ton bg dark custom */
    color: #ffe382;
    border-color: #ffe25933;
}

[data-theme="dark"] .premium-feature h3,
[data-theme="dark"] .pricing-card h3,
[data-theme="dark"] .price {
    color: #ffeaa7;
}

[data-theme="dark"] .premium-feature p,
[data-theme="dark"] .pricing-card ul,
[data-theme="dark"] .pricing-card p {
    color: #ffe382;
}


/* ==========================================
   UTILITAIRES
   ========================================== */

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.premium-locked {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.premium-locked::after {
    content: '🔒 Premium';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--premium-gradient);
    color: var(--text-dark);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: linear-gradient(to bottom, var(--bg-white), var(--bg-light));
        animation: slideDown 0.4s ease;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow);
    }

    @keyframes slideDown {
        from {
            transform: translateY(-10px);
            opacity: 0;
        }

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

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .week-grid {
        grid-template-columns: 1fr;
    }

    .navbar {
        padding: 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    /* Spécifique aux éléments scrollables dans les grilles de sélection */
    .recipe-selector-grid,
    .blog-grid,
    .ingredients-list {
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* Internet Explorer 10+ */
    }

    .recipe-selector-grid::-webkit-scrollbar,
    .blog-grid::-webkit-scrollbar,
    .ingredients-list::-webkit-scrollbar {
        display: none;
        /* Safari et Chrome */
    }

    /* Responsive pour le formulaire de liste de courses */
    .shopping-container>.ingredients-list:first-of-type>div:first-child {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .shopping-container>.ingredients-list:first-of-type button {
        justify-self: stretch;
    }
}

.meal-slot.filled {
    padding: 0;
    /* on gère le padding dans .slot-card */
    background: transparent;
    /* on voit juste la carte */
}

.slot-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slot-card:active {
    cursor: grabbing;
    transform: scale(0.98);
}

.slot-card__header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.slot-card__emoji {
    font-size: 2rem;
}

.slot-card__body {
    padding: 0.75rem 1rem 1rem;
    background: var(--bg-white);
}

.slot-card__title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.2;
}

.slot-card__meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.slot-card__author {
    font-size: 0.75rem;
    color: var(--text-light);
}

.slot-card__remove {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--danger);
    cursor: pointer;
}

.slot-card__remove:hover {
    background: rgb(240, 15, 15);
}


.week-start-selector {
    display: inline-flex;
    align-items: center;
    /* <-- aligné sur la baseline ! */
    margin-bottom: 0;
    gap: 0.4rem;
    vertical-align: middle;
}

.week-start-selector label {
    margin: 0 0.5rem 0 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color, #73ffd1);
    line-height: 1.2;
    padding: 0;
    align-self: center;
}

.week-start-selector select {
    appearance: none;
    border: none;
    margin: 0;
    padding: 0.5rem 2.2rem 0.5rem 1rem;
    border-radius: 1.2rem;
    font-size: 1rem;
    font-weight: 500;
    background: var(--bg-elevated, #242936);
    color: var(--text-light, #fff);
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.07);
    outline: none;
    transition: border 0.2s, box-shadow 0.2s, background 0.3s;
    cursor: pointer;
    position: relative;
    min-width: 5.5rem;
    vertical-align: middle;

    /* flèche personnalisée */
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 1.2rem;
}

.week-start-selector select:focus,
.week-start-selector select:hover {
    background: var(--primary-light, #303855);
    color: var(--primary-color, #73ffd1);
    box-shadow: 0 4px 18px 0 rgba(115, 255, 209, 0.12);
}

.week-start-selector select option {
    background: #222;
    color: #fff;
}

@media (max-width: 600px) {
    .week-start-selector select {
        font-size: 0.95rem;
        min-width: 7rem;
        padding: 0.5rem 2rem 0.5rem 1rem;
    }
}

/* ==========================================
   MODALS
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 34, 52, 0.80);
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-elevated, #232945);
    color: var(--text-light, #fff);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    box-shadow: 0 8px 40px rgba(30, 34, 52, 0.35);
    max-width: 400px;
    width: 100%;
    animation: popIn 0.3s cubic-bezier(.48, 1.52, .37, .98);
}

@keyframes popIn {
    0% {
        transform: scale(.8);
    }

    100% {
        transform: scale(1);
    }
}

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

.modal-icon {
    font-size: 2rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-danger {
    background: #f76c6c;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: bold;
    cursor: pointer;
}



/* ==========================================
   SECTION ACCEUIL
   ========================================== */

.clean-hero {
    background: linear-gradient(120deg, #6a89e7 0%, #8360c3 100%);
    color: #fff;
    min-height: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem 3rem 1rem;
    border-radius: 22px;
    box-shadow: 0 4px 24px #544fcf25;
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.clean-hero::before {
    content: '';
    position: absolute;
    left: -70px;
    top: 38px;
    width: 180px;
    height: 180px;
    background: #a2aaf623;
    border-radius: 50%;
    z-index: 0;
}

.clean-hero::after {
    content: '';
    position: absolute;
    right: -110px;
    top: -60px;
    width: 220px;
    height: 220px;
    background: #8560c328;
    border-radius: 50%;
    z-index: 0;
}

.clean-hero-content {
    text-align: center;
    max-width: 670px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-img {
    width: 100%;
    max-width: 340px;
    aspect-ratio: 5/3;
    object-fit: cover;
    border-radius: 19px;
    margin: 0 auto 2.1rem auto;
    box-shadow: 0 1px 14px #2b296e24;
    display: block;
    filter: brightness(1.09) saturate(1.03);
}

.clean-hero h1 {
    font-size: 2.15rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    line-height: 1.19;
    letter-spacing: -0.01em;
    background: none;
    color: #fff;
    text-shadow: 0 2px 12px #3a227673;
}

.clean-lead {
    font-size: 1.16rem;
    margin-bottom: 0;
    color: #e7e4ff;
    line-height: 1.7;
    font-weight: 400;
}

.hero-extras {
    gap: 1.2rem;
    justify-content: center;
}

.hero-extra-block {
    background: #fff2;
    color: #e1d8ff;
    border-radius: 13px;
    padding: 0.75em 1.2em;
    font-size: 1.05em;
    box-shadow: 0 2px 10px #3e277a22;
    font-weight: 600;
    opacity: .97;
    border: 1.5px solid #fff3;
}

@media (max-width: 600px) {
    .clean-hero {
        padding: 2.1rem 0.3rem 2.7rem 0.3rem;
        min-height: 300px;
    }

    .hero-img {
        max-width: 97vw;
        border-radius: 13px;
    }

    .clean-hero h1 {
        font-size: 1.13rem;
    }

    .hero-extras {
        gap: 0.5rem;
    }
}

@media (prefers-color-scheme: dark) {
    .clean-hero {
        background: linear-gradient(120deg, #262a53 0%, #50396d 100%) !important;
        color: #f5f2fa;
        box-shadow: 0 4px 32px #18143033;
    }

    .clean-lead {
        color: #beb3e2;
    }

    .hero-img {
        filter: brightness(0.93) saturate(1.1);
    }

    .hero-extra-block {
        background: #322b43aa;
        color: #d9cafd;
    }
}


.section-bg-gradient.install-tuto {
    background: linear-gradient(120deg, #6a89e7 0%, #8360c3 100%);
    border-radius: 22px;
    box-shadow: 0 4px 24px #614fa912;
}

@media (prefers-color-scheme: dark) {
    .section-bg-gradient.install-tuto {
        background: linear-gradient(120deg, #282648 70%, #4b367c 100%);
        color: #ede4fe;
    }
}

.install-tuto ol li {
    margin-bottom: 0.17em;
}

.install-tuto h3 {
    color: #fff !important;
}



.section-bg-gradient {
    background: linear-gradient(120deg, #6a89e7 0%, #8360c3 100%);
    border-radius: 22px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.section-bg-gradient::before {
    content: '';
    position: absolute;
    left: -70px;
    top: 38px;
    width: 160px;
    height: 160px;
    background: #a2aaf61a;
    border-radius: 50%;
    z-index: 0;
}

.section-bg-gradient::after {
    content: '';
    position: absolute;
    right: -110px;
    top: -60px;
    width: 200px;
    height: 200px;
    background: #8560c320;
    border-radius: 50%;
    z-index: 0;
}

.section-bg-gradient>* {
    position: relative;
    z-index: 2;
}

.explore-benefits {
    margin-bottom: 2.2rem;
}

.explore-card {
    background: rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    box-shadow: 0 2px 12px #32217512;
    padding: 1.3rem 1rem;
    color: #f7f7ff;
    display: flex;
    gap: 1.2em;
    align-items: center;
    font-size: 1.08em;
    min-height: 64px;
    font-weight: 500;
    transition: box-shadow .17s;
}

.explore-card:hover {
    box-shadow: 0 6px 32px #6b6ae340;
}

.explore-icon {
    flex-shrink: 0;
    font-size: 2.05em;
    filter: drop-shadow(0 2px 6px #1d174845);
}

.install-app-tuto {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 12px #b8b8f51b;
    font-size: 1.01em;
}

.install-app-tuto ol {
    margin: 0 0 0 1.2em;
    padding: 0;
    color: #e8e2ff;
}

.install-app-tuto li {
    margin-bottom: 0.53em;
}

@media (max-width: 700px) {
    .section-bg-gradient {
        border-radius: 0;
    }

    .explore-benefits {
        grid-template-columns: 1fr;
    }

    .install-app-tuto {
        padding: 1.3rem 0.6rem;
    }
}


.install-tuto {
    box-shadow: 0 2px 22px #4328872f;
}

.home-explore-minis {
    background: var(--bg-light, #fcfafd);
    border-radius: 28px;
    box-shadow: 0 2px 18px #9d8ed619;
    padding: 2.1rem 2.1rem 1.3rem 2.1rem;
    margin: 2.3rem auto 2.5rem auto;
}

.mini-features-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 1.45em;
    justify-content: center;
    align-items: stretch;
}

.mini-feature-card {
    display: flex;
    align-items: center;
    gap: 1.05em;
    background: linear-gradient(120deg, rgba(106, 137, 231, 0.28) 60%, rgba(131, 96, 195, 0.22) 100%);
    /* glassmorphism */
    backdrop-filter: blur(4px) saturate(1.3);
    -webkit-backdrop-filter: blur(4px) saturate(1.3);
    border-radius: 13px;
    border: 1px solid rgba(110, 80, 200, 0.13);
    padding: 1em 1.2em 1em 0.7em;
    box-shadow: 0 1px 10px #8360c311, 0 1px 7px #e0d7f725;
    min-width: 200px;
    max-width: 380px;
    width: 100%;
    flex: 1 1 260px;
    transition: box-shadow .16s, background .18s;
}

.mini-feature-card:hover {
    box-shadow: 0 6px 28px #8360c336, 0 3px 24px #aca4e838;
    background: linear-gradient(120deg, rgba(106, 137, 231, 0.38) 65%, rgba(131, 96, 195, 0.32) 100%);
}

.mini-feature-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 11px;
    box-shadow: 0 1px 9px #ad93f024;
    background: #edeaf9;
    flex-shrink: 0;
    border: 1.5px solid rgba(110, 80, 200, 0.13);
    display: block;
}

.mini-feature-title {
    font-size: 1.13em;
    font-weight: 700;
    color: #563f88;
    letter-spacing: -0.01em;
}

.mini-feature-desc {
    font-size: 0.98em;
    opacity: .92;
    color: #5e4e8a;
}

@media (max-width: 1050px) {
    .mini-feature-card {
        max-width: 48%;
        min-width: 180px;
    }

    .mini-features-flex {
        gap: 1em;
    }
}

@media (max-width: 700px) {
    .mini-features-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 1em;
    }

    .mini-feature-card {
        max-width: 100%;
        min-width: 0;
    }

    .home-explore-minis {
        padding: 1.1rem 0.2rem;
    }
}

/* Dark mode : utilise prefers-color-scheme ou ton sélecteur */
@media (prefers-color-scheme: dark) {
    .mini-feature-card {
        background: linear-gradient(120deg, rgba(67, 56, 102, 0.64) 60%, rgba(99, 70, 136, 0.45) 100%);
        color: #e6dcfa;
        border: 1px solid rgba(100, 80, 170, 0.14);
    }

    .mini-feature-title {
        color: #e3defb;
    }

    .mini-feature-desc {
        color: #c2b5e4;
    }

    .mini-feature-img {
        background: #312850;
    }
}

@keyframes premiumPulse {
    0% {
        box-shadow: 0 4px 30px #ffd70033;
    }

    100% {
        box-shadow: 0 6px 60px #ffeb3b55;
    }
}


#categoryInfo {
    font-size: 0.89em;
    margin-top: 0.1em;
    color: #aaa;
    display: block;
    margin-left: 0.5em;
}


/* ==========================================
   SECTION REPORTS
   ========================================== */

#report.page.active {
    display: flex !important;
    flex-direction: row;
}


@media (max-width: 900px) {
    #report.page {
        flex-direction: column !important;
        gap: 0 !important;
    }
    #report .report-container,
    #report > div[style*="flex: 1"] {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

#report.page {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    align-items: flex-start;
    min-height: 80vh;
    margin: 0 auto;
    width: 100%;
    max-width: 1200px;
}
.report-container {
    background: var(--bg-light, #1c1c1c);
    border-radius: 18px;
    box-shadow: 0 4px 20px #0003;
    padding: 2rem 2.2rem 1.5rem 2.2rem;
    min-width: 320px;
    max-width: 420px;
    flex: 0 0 410px;
}
.report-title {
    color: var(--primary-color, #ff6577);
    margin-bottom: 1.7rem;
    font-weight: 700;
    letter-spacing: -1px;
}
.form-group { margin-bottom: 1.3rem; }
.form-group label { font-weight: 600; margin-bottom: .4rem; display: block; }
.required { color: #ff6577; }
.form-control {
    width: 100%;
    background: var(--bg-white, #232323);
    color: var(--text-main, #eee);
    border-radius: 8px;
    border: 1.2px solid #444;
    padding: .72em .98em;
    font-size: 1em;
    margin-top: .25em;
}
.form-control:focus { border-color: var(--primary-color, #ff6577); outline: none; }
.btn.btn-primary {
    background: var(--primary-color, #ff6577);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .82em 1.7em;
    font-size: 1em;
    font-weight: 700;
    box-shadow: 0 2px 8px #0002;
    cursor: pointer;
    transition: background 0.17s;
}
.btn.btn-primary:hover { background: #f1415d; }
.form-feedback { margin-top: 1rem; font-size: 1em; }

/* Colonne centrale qui contient tickets + panneau */
.tickets-panel {
    position: relative;
    flex: 1;
    min-width: 320px;
    max-width: 800px;
    margin-top: 0;
    display: flex;
    flex-direction: row;
    gap: 0;
    align-items: flex-start;
}


/* Liste des tickets : occupe la moitié */
#myReportsSection {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
}

/* Panneau conversation : flottant à droite */
#ticketConversationPanel {
    flex: 1;
    min-width: 320px;
    max-width: 420px;
    margin-left: 2rem;
    position: sticky;
    top: 2.5rem;
    align-self: flex-start;
    z-index: 2;
    /* Optionnel : transition pour apparition */
    transition: opacity 0.2s;
}
#ticketConversationPanel:empty {
    display: none;
}

@media (max-width: 1000px) {
    #report.page, .tickets-panel {
        flex-direction: column;
    }
    #ticketConversationPanel {
        margin-left: 0;
        margin-top: 2rem;
        max-width: 100%;
        min-width: 0;
        position: static;
    }
}

@media (max-width: 900px) {
    #report.page { flex-direction: column; gap: 0; }
    .report-container, .tickets-panel {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

.conversation-card {
    background: var(--bg-white, #232323);
    border-radius: 13px;
    box-shadow: 0 2px 10px #0002;
    padding: 1.3em 1.2em 1.1em 1.2em;
}
.conversation-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0.6em;
}
.tickets-title {
    color: var(--primary-color, #ff6577);
    margin-bottom: 1.3em;
    font-weight: bold;
    font-size: 1.45rem;
    letter-spacing: -0.5px;
}
.ticket-title {
    font-weight: bold;
    font-size: 1.35em;
    color: var(--primary-color, #ff6577);
    margin-bottom: .2em;
}
.client-ticket {
    font-weight: bold;
    font-size: 1.15em;
    color: var(--text-dark);
    margin-bottom: .2em;
}
@media (max-width: 700px) {
    .report-title { font-size: 1.3rem; }
    .tickets-title { font-size: 1.08rem; }
    .ticket-title { font-size: 1.08em; }
}
.ticket-status {
    border-radius: 6px; padding: 3px 13px; font-weight: 600; font-size: .97em;
}
.ticket-meta { color: var(--text-light, #aaa); font-size: .98em; margin-bottom: .5em; }
.conversation-history {
    max-height: 260px; overflow-y: auto;
    background: var(--bg-light, #191919);
    padding: .7em; border-radius: 8px;
    margin-bottom: 1em;
    display: flex; flex-direction: column; gap: 1em;
}
.chat-bubble {
    padding: .5em .9em;
    border-radius: 12px;
    background: #232e38;
    max-width: 85%;
    word-break: break-word;
}
.chat-bubble.me {
    background: #273b34;
    color: #caffd5;
    align-self: flex-end;
}
.chat-bubble.admin {
    background: #39282f;
    color: #ffe3ee;
    align-self: flex-start;
}
.author {
    font-size: .87em; font-weight: bold; margin-bottom: 0.17em;
    color: #ff6577;
}
.bubble-date {
    font-weight: normal;
    color: #b8a66c;
    margin-left: .5em;
    font-size: .84em;
}
.conversation-textarea {
    width: 100%;
    border-radius: 7px;
    border: 1px solid #555;
    padding: .6em;
    font-size: 1em;
    background: var(--bg-white, #222);
    color: var(--text-main, #eee);
}
#clientConversationForm {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    margin-top: 1em;
}

.conversation-send-btn {
    align-self: flex-end;
    background: var(--primary-color, #ff6577);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .75em 2.4em;
    font-size: 1.08em;
    font-weight: 700;
    box-shadow: 0 2px 8px #0002;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 0.4em;
}

.conversation-send-btn:hover {
    background: #f1415d;
}

.conversation-textarea {
    width: 100%;
    border-radius: 7px;
    border: 1px solid #555;
    padding: .6em;
    font-size: 1em;
    background: var(--bg-white, #222);
    color: var(--text-main, #eee);
    resize: vertical;
}



