/* ============================================
   NUTRIKAL - STYLES GLOBAUX
   ============================================ */

/* --------------- RESET & VARIABLES --------------- */

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

:root {
    --blue-numedikal: #19195A;
    --pink-numedikal: #ED00AA;
    --pink-numedikal-rgb: 237,0,170;
    --over-color: #7500A7;
    --light-color: #F7FAFC;
    --info-color: #888;
    --white: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* --------------- ANIMATIONS --------------- */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --------------- BODY & LAYOUT GÉNÉRAL --------------- */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--blue-numedikal);
    min-height: 100vh;
    overflow-x: hidden;
}

body.login {
    font-family: 'Open Sans', sans-serif;
    background: var(--blue-numedikal);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.register {
    background-image: url("../images/fond.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#root {
    width: 100%;
    max-width: 600px;
    background: var(--blue-numedikal);
    border-radius: 100px;
}

/* --------------- ÉLÉMENTS COMMUNS --------------- */

.highlight {
    color: var(--pink-numedikal);
    font-weight: bold;
}

.logo {
    text-align: center;
    border-radius: 30px;
}

/* --------------- FORMULAIRES GÉNÉRAUX --------------- */

label {
    display: block;
    margin-bottom: 8px;
    color: var(--blue-numedikal);
    font-weight: 500;
    font-size: 0.95em;
}

.form-group {
    margin-bottom: 20px;
}

.input-wrapper {
    position: relative;
}

input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 30px;
    font-size: 1em;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--over-color);
    box-shadow: 0 0 0 3px rgba(var(--pink-numedikal-rgb), 0.1);
}

input::placeholder {
    color: var(--pink-numedikal);
}

.input-unit {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 0.95em;
    pointer-events: none;
}

.password-toggle {
    position: relative;
}

.password-toggle button {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--pink-numedikal);
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
}

.password-toggle button:hover {
    color: white;
}

/* Boutons généraux */
.btn {
    padding: 14px;
    border: none;
    border-radius: 30px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9em;
    animation: fadeIn 0.3s ease-in;
}

.alert-error {
    background-color: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.alert-success {
    background-color: #efe;
    color: #3c3;
    border-left: 4px solid #3c3;
}

/* Flash messages */
.flash-message {
    padding: 1rem;
    margin: 1rem 2rem;
    border-radius: 10px;
    text-align: center;
}

.flash-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

main.login-page {
    color: #fff;
    text-align: center;
    width: 100%;
    max-width: 560px;
    padding: 30px;
}

.login-logo-img {
    max-width: 500px;
    width: 100%;
    height: auto;
    margin-bottom: 45px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.input-email,
.input-password {
    width: 90%;
    background-color: var(--blue-numedikal);
    color: white;
    border: 2px solid var(--pink-numedikal);
}

.btn-se-connecter {
    width: 50%;
    padding: 14px;
    background: var(--pink-numedikal);
    color: white;
    border: 1px solid var(--pink-numedikal);
    border-radius: 30px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-se-connecter:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--pink-numedikal);
    background: var(--over-color);
}

.btn-se-connecter:active {
    transform: translateY(0);
}

.btn-se-connecter:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.divider {
    text-align: center;
    margin: 25px 0;
    color: var(--pink-numedikal);
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: white;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.register-link {
    text-align: center;
    margin-top: 20px;
    color: var(--pink-numedikal);
    font-size: 1em;
}

.register-link a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: var(--over-color);
    text-decoration: underline;
}

/* ============================================
   PAGE REGISTER
   ============================================ */

.register-logo-img {
    max-width: 300px;
    width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    border-color: white;
    margin-right: auto;
    position: relative;
}

.register-container {
    background: white;
    border-radius: 100px;
    box-shadow: var(--box-shadow);
    padding: 5% 15% 5%;
    animation: slideIn 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.step-title {
    text-align: center;
    color: var(--blue-numedikal);
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: 600;
}

.step-subtitle {
    text-align: center;
    color: var(--blue-numedikal);
    margin-bottom: 20px;
    font-size: 1.5em;
}

.step-content {
    animation: fadeIn 0.4s ease-out;
}

.progress-bar {
    height: 6px;
    background: var(--light-color);
    border-radius: 10px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--pink-numedikal);
    transition: width 0.4s ease;
    border-radius: 10px;
}

.options-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 10px;
}

.option-btn-gender,
.option-btn {
    width: 100%;
    padding: 18px 24px;
    border: 2px solid var(--blue-numedikal);
    border-radius: 30px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2em;
    font-weight: 500;
    color: var(--blue-numedikal);
    text-align: center;
}

.option-btn-gender:hover,
.option-btn:hover {
    border-color: var(--over-color);
    background: var(--over-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--pink-numedikal);
}

.option-btn-gender.selected,
.option-btn.selected {
    border-color: var(--pink-numedikal);
    background: var(--pink-numedikal);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.gender-options {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.input-register {
    padding: 14px 50px 14px 16px;
    border: 2px solid var(--blue-numedikal);
    border-radius: 30px;
    font-size: 1em;
    transition: all 0.3s ease;
    background-color: var(--light-color);
}

.input-register::placeholder {
    color: var(--info-color);
}

.input-register:focus {
    background-color: white;
}

.password-strength {
    margin-top: 8px;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-text {
    margin-top: 5px;
    font-size: 0.85em;
    color: var(--info-color);
}

.info-text {
    font-size: 0.85em;
    color: var(--info-color);
    margin-top: 5px;
}

.navigation-buttons {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 20px;
}

.btn-suivant {
    width: 30%;
    background: var(--pink-numedikal);
    color: white;
}

.btn-suivant:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--pink-numedikal);
    background: var(--over-color);
}

.btn-precedant {
    width: 30%;
    background: var(--light-color);
    color: var(--info-color);
}

.btn-precedant:hover {
    background: var(--over-color);
}

.btn-precedant:disabled {
    background: white;
    cursor: default;
    transform: none;
}

.btn-suivant:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.welcome-screen {
    text-align: center;
    padding: 60px 20px;
}

.welcome-screen h2 {
    color: var(--blue-numedikal);
    font-size: 2.4em;
    margin-bottom: 20px;
}

.welcome-screen p {
    color: #666;
    font-size: 1.2em;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--pink-numedikal);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 3em;
    animation: scaleIn 0.5s ease-out;
    color: white;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    background: var(--pink-numedikal);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
    color: white;
}

.navbar .pseudo {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.navbar .objectif-badge {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(50%);
    background: var(--blue-numedikal);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.5rem;
    z-index: 20;
}

.navbar .nav-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.navbar .nav-icons img {
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    filter: brightness(0) invert(1);
}

.nav-icons-petite {
    width: 34px;
    height: 34px;
}

.nav-icons-grande {
    width: 34px;
    height: 34px;
    padding: 6px;
}

.navbar .nav-icons img:hover {
    transform: translateY(-2px);
}

/* ============================================
   DASHBOARD - CONTENEUR PRINCIPAL
   ============================================ */

.dashboard-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 0rem 2rem 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* --------------- PANNEAU PERFORMANCE (GAUCHE) --------------- */

.performance-panel {
    background: var(--blue-numedikal);
    padding: 0rem;
}

/* Score Circle */
.score-circle-container {
    text-align: center;
    position: relative;
    width: 400px;
    height: 240px;
    margin: 0 auto;
}

.score-circle {
    width: 100%;
    height: 100%;
}

.score-circle path {
    fill: none;
    stroke-width: 15;
    stroke-linecap: round;
}

.score-circle path:first-child {
    stroke: var(--pink-numedikal);
}

#scoreArc {
    stroke: white;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 0.5s ease;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 3rem;
    font-weight: 700;
    color: var(--light-color);
    transform: translate(-50%, -25%);
    text-align: center;
}

.score-label {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translate(-50%, 50%);
    font-size: 1.1rem;
    color: white;
    text-align: center;
}

/* Sliders */
.sliders-container { 
    display: flex;
    padding : 0 4rem; 
    flex-direction: column; 
    gap: 1.5rem; 
    margin-bottom: 2rem; } 
    
.slider-item { 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
} 

.slider-label { 
    min-width: 130px; 
    font-weight: 500; 
    color: white; 
} 

.slider-wrapper { 
    flex: 1; 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
} 

input[type="range"] { 
    flex: 1; 
    height: 8px; 
    border-radius: 5px; 
    background:white; 
    outline: none; 
    -webkit-appearance: none; 
    padding: 4px 4px;

} 

input[type="range"]::-webkit-slider-thumb { 
    -webkit-appearance: none; 
    appearance: none; 
    width: 20px; 
    height: 20px; 
    border-radius: 50%; 
    background: var(--pink-numedikal); 
    cursor: pointer; transition: transform 0.2s; 
} 

input[type="range"]::-webkit-slider-thumb:hover { 
    transform: scale(1.2); 
    background: var(--over-color); 
} 

input[type="range"]::-moz-range-thumb { 
    width: 20px; 
    height: 20px; 
    border-radius: 50%; 
    background: var(--pink-numedikal); 
    cursor: pointer; 
    border: none; 
} 

.slider-value {
    min-width: 30px; 
    text-align: center; 
    font-weight: 600; 
    color: var(--pink-numedikal); 
}

/* Conseil Box */
.dashboard-conseil-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.conseil-text {
    color: white;
    line-height: 1.6;
    font-size: 1rem;
    text-align: justify;
}

.conseil-text .highlight {
    color: #ED00AA;
    font-weight: bold;
}

/* --------------- PANNEAU HISTORIQUE (DROITE) --------------- */

.historique-panel {
    background: var(--blue-numedikal);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.chart-container {
    height: 300px;
    margin-bottom: 0.5rem;
    position: relative;
}

#performanceChart {
    width: 100%;
    height: 100%;
}

/* --------------- REPAS --------------- */

.repas-container {
    display: grid;
    grid-template-columns: 1fr 2px 1fr;
    gap: 20px;
    margin-top: 20px;
    align-items: start;
}

.repas-separator {
    width: 2px;
    background: white;
    height: 100%;
    min-height: 300px;
}

.repas-colonne h3 {
    font-size: 1.2rem;
    color: white;
    margin-bottom: 1rem;
    text-align: center;
}

.aliments-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    height: 200px;
}

.aliment-card {
    text-align: center;
    padding: 1rem;
    border: 2px solid white;
    border-radius: 10px;
    transition: transform 0.2s;
}

.aliment-card:first-child {
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.aliment-card:hover {
    border: 2px solid var(--over-color);
    box-shadow: 0 10px 20px var(--pink-numedikal);
}

.aliment-card img {
    width: auto;
    height: 60px;
    max-width: 60px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.aliment-card:first-child img {
    height: 120px;
    width: auto;
    max-width: 110px;
}

.aliment-card .nom {
    font-size: 0.5rem;
    color: white;
}

.aliment-card:first-child .nom {
    font-size: 0.9rem;
    color: white;
}

.aliment-card.consomme {
    border: 2px solid var(--pink-numedikal);
}

.aliment-card.consomme:hover {
    border: 2px solid var(--over-color);
    box-shadow: 0 10px 20px white;
}

.btn-plan {
    width: 50%;
    padding: 1rem;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-plan:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

/* ============================================
   PAGE HISTORIQUE
   ============================================ */

.historique-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.historique-left .score-circle-container {
    margin-bottom: 0;
}

.mini-chart-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1rem;
    height: 200px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.motivation-box {
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1rem 1.5rem 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.motivation-date {
    font-weight: bold;
    color: #ED00AA;
    margin-bottom: 1rem;
    text-align: center;
}

.motivation-text {
    color: white;
    line-height: 1.6;
    font-size: 1rem;
    text-align: justify;
}

.motivation-text .highlight {
    color: #ED00AA;
    font-weight: bold;
}

.historique-right {
    display: flex;
    flex-direction: column;
}

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

.period-btn {
    background: var(--blue-numedikal);
    border: 1px solid white;
    color: rgba(247, 250, 252, 0.9);
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.period-btn:hover {
    background: var(--over-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.period-btn.active {
    background: var(--pink-numedikal);
    border-color: var(--pink-numedikal);
    color: white;
    box-shadow: 0 4px 15px rgba(237, 0, 170, 0.4);
}

.stats-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1rem 1.5rem 0rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
}

.stats-box h3 {
    color: #ED00AA;
    font-size: 1.1rem;
    text-align: center;
    text-transform: capitalize;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.stat-icon {
    font-size: 1.5rem;
}

.stat-label {
    color: rgba(247, 250, 252, 0.75);
    font-size: 0.95rem;
    flex: 1;
}

.stat-value {
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
}

/* ============================================
   PAGE PLAN ALIMENTAIRE
   ============================================ */

.plan-container {
    background: var(--blue-numedikal);
    padding: 2rem;
}

.plan-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    min-width: 1000px;
}

/* Cases vides */
.empty-cell {
    background: transparent;
}

/* En-têtes de jours */
.day-header {
    grid-column: span 1;
    background: var(--blue-numedikal);
    border: 1px solid white;
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.day-header.first {
    border-radius: 50px 0px 0px 0px;
}

.day-header.last {
    border-radius: 0px 50px 0px 0px;
}

.day-header.today {
    grid-column: span 3;
    font-size: 1.2rem;
}

.day-header[data-is-today="true"] {
    background: var(--pink-numedikal) !important;
}

.day-name {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.day-date {
    font-size: 1.1rem;
    font-weight: bold;
}

/* Labels de repas */
.meal-label {
    grid-column: span 3;
    background: var(--blue-numedikal);
    border: 2px solid white;
    padding: 0.5rem;
    text-align: center;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cartes aliments du plan */
.plan-aliment-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    text-align: center;
    padding: 0.5rem;
    border: 1px solid white;
    transition: none;
}

.plan-aliment-card:hover {
    transform: none;
    border: 1px solid white;
}

.plan-aliment-card img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.plan-aliment-card img:hover {
    border-color: var(--over-color);
    transform: scale(1.1);
}

.plan-aliment-card img.consomme {
    border-color: var(--pink-numedikal);
}

.plan-aliment-card img.consomme:hover {
    border-color: white;
}

.plan-aliment-card.consomme,
.today-aliment-card.consomme {
    border: 1px solid var(--pink-numedikal);
}

.plan-aliment-card.consomme:hover,
.today-aliment-card.consomme:hover {
    border: 1px solid var(--over-color);
    box-shadow: 0 0px 10px white;
}

/* Bloc repas du jour */
.today-meal-block {
    grid-column: span 3;
    display: flex;
    flex-direction: column;
    border: none;
    background: var(--blue-numedikal);
}

.today-meal-block .meal-label {
    border: none;
    border-bottom: 2px solid white;
    grid-column: auto;
    border-radius: 20px;
}

.today-aliments-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0;
    flex: 1;
}

.today-aliment-card {
    text-align: center;
    border: 1px solid white;
    margin: 8px;
    border-radius: 20px;
}

.today-aliment-card:hover {
    border: 1px solid var(--over-color);
    box-shadow: 0 0px 10px var(--pink-numedikal);
}

.today-aliment-card:first-child {
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.today-aliment-card img {
    width: auto;
    height: 40px;
}

.today-aliment-card:first-child img {
    height: 80px;
    width: auto;
}

.today-aliment-card .nom {
    font-size: 0.6rem;
    color: white;
    margin-bottom: 0.3rem;
}

/* Boutons de navigation du plan */
.nav-button {
    background: var(--pink-numedikal);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.4);
    transition: all 0.3s ease;
    flex-shrink: 0;
    justify-self: center;
    align-self: center;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--pink-numedikal);
    background: var(--over-color);
}

.nav-button:active {
    transform: scale(0.95);
}

.nav-button svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.nav-button.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   PAGE INFORMATIONS PERSONNELLES
   ============================================ */

.infos-container {
    display: grid;
    grid-template-columns: 1fr 2px 1fr;
    gap: 2rem;
    padding: 0 2rem auto;
    max-width: 1400px;
    margin: 0 auto;
}

.infos-separator {
    width: 2px;
    background: white;
    height: 100%;
    min-height: 300px;
}

.panel {
    backdrop-filter: blur(10px);
    padding: 2rem;
}

.panel-h2-container {
    display: flex;
    justify-content: center;
}

.panel h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* --------------- PANNEAU ALLERGIES --------------- */

.allergies-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--blue-numedikal);
    border: 2px solid var(--pink-numedikal);
    border-radius: 15px;
    color: var(--info-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--over-color);
    box-shadow: 0 0 0 3px rgba(var(--pink-numedikal-rgb), 0.1);
    color: white;
}

.search-input::placeholder {
    color: var(--info-color);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 1rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.search-result-item:hover {
    background: rgba(237, 0, 170, 0.2);
}

.allergies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.allergie-card {
    position: relative;
    border: 1px solid white;
    border-radius: 20px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.allergie-card:hover {
    transform: translateY(-5px);
    border: 2px solid var(--over-color);
    box-shadow: 0 10px 20px var(--pink-numedikal);
}

.allergie-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.allergie-card .nom {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
}

.remove-allergie {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.2s ease;
}

.remove-allergie:hover {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

.allergies-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    justify-content: space-between;
}

.allergie-toggle-btn {
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--pink-numedikal);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.allergie-toggle-btn:hover:not(:disabled) {
    box-shadow: 0 10px 20px var(--pink-numedikal);
    background: var(--over-color);
    border: 2px solid var(--over-color);
    color: white;
}

.allergie-toggle-btn.active {
    background: var(--pink-numedikal);
    color: white;
    box-shadow: 0 4px 15px rgba(237, 0, 170, 0.4);
}

.allergie-toggle-btn.active:hover:not(:disabled) {
    box-shadow: 0 10px 20px var(--pink-numedikal);
    background: var(--pink-numedikal);
    border: 2px solid white;
}

.allergie-toggle-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.allergie-toggle-btn:active:not(:disabled) {
    transform: translateY(0);
}

/* Animation au chargement */
.allergie-toggle-btn {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

/*
.allergie-toggle-btn:nth-child(1) { animation-delay: 0.05s; }
.allergie-toggle-btn:nth-child(2) { animation-delay: 0.1s; }
.allergie-toggle-btn:nth-child(3) { animation-delay: 0.15s; }
.allergie-toggle-btn:nth-child(4) { animation-delay: 0.2s; }
.allergie-toggle-btn:nth-child(5) { animation-delay: 0.25s; }
*/

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------- PANNEAU INFORMATIONS --------------- */

.infos-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-field {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-field label {
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--blue-numedikal);
    padding: 2px 10px;
    color: var(--pink-numedikal);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 5px;
    z-index: 1;
}

.form-field .label-form {
    color: var(--pink-numedikal);
    transition: color 0.2s ease;
}

.form-field input:focus ~ .label-form,
.form-field select:focus ~ .label-form {
    color: var(--over-color);
}

.form-field input,
.form-field select {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--blue-numedikal);
    border: 2px solid var(--pink-numedikal);
    border-radius: 15px;
    color: var(--info-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.infos-panel .form-field input:focus,
.infos-panel .form-field select:focus {
    outline: none;
    border-color: var(--over-color);
    box-shadow: 0 0 0 3px rgba(var(--pink-numedikal-rgb), 0.1);
    color: white;
}

.infos-panel .form-field input.modified,
.infos-panel .form-field select.modified {
    color: #ffffff !important;
}

.form-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.form-field select option {
    background: #1a1a2e;
    color: #fff;
}

.form-field input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-submit {
    background: var(--pink-numedikal);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--pink-numedikal);
    background: var(--over-color);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-change-password {
    background: linear-gradient(135deg, #ED00AA 0%, #A100F5 100%);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-change-password:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #A100F5 0%, #ED00AA 100%);
}

/* --------------- PAGE CHANGEMENT DE MOT DE PASSE --------------- */

/* Styles pour le modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 999;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    text-align: center;
    background: var(--blue-numedikal);
    border-radius: 20px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px var(--over-color);
    border: 2px solid var(--pink-numedikal);
    animation: slideIn 0.5s ease;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(237, 0, 170, 0.3);
    transform: rotate(90deg);
}

.modal-content h2 {
    color: #ED00AA;
    margin-bottom: 0.5rem;
}

.modal-content > p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Adapter les styles du formulaire de mot de passe pour le modal */
.modal-content .form-field {
    margin-bottom: 1.5rem;
}

.modal-content .password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.modal-content .password-input-wrapper input {
    flex: 1;
    padding-right: 3rem;
}

.modal-content .toggle-password {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.modal-content .toggle-password:hover {
    opacity: 1;
}

.modal-content .password-strength-change {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.modal-content .password-strength-bar-change {
    height: 100%;
    width: 0%;
    background: #e0e0e0;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

.modal-content .password-strength-text {
    font-size: 0.85rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.modal-content .info-text {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.modal-content .success-text {
    color: #00cc00;
}

.modal-content .error-text {
    color: #ff4444;
}

.modal-content .password-requirements {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.modal-content .password-requirements strong {
    color: #ED00AA;
    display: block;
    margin-bottom: 0.5rem;
}

.modal-content .password-requirements ul {
    margin: 0;
    padding-left: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.modal-content .password-requirements li {
    margin: 0.25rem 0;
}

.modal-content .btn-container {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-content .btn-password {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-content .btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-content .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.modal-content .btn-submit {
    background: linear-gradient(135deg, #ED00AA, #FF1493);
    color: white;
}

.modal-content .btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(237, 0, 170, 0.4);
}

.modal-content .btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

        
/* ============================================
   POP-UP BIENVENUE (PREMIER LOGIN)
   ============================================ */

.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}

.welcome-popup {
    background: var(--blue-numedikal);
    border: 2px solid var(--pink-numedikal);
    border-radius: 20px;
    padding: 20px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 40px var(--over-color);
    animation: slideIn 0.5s ease;
    position: relative;
    z-index: 9999;
}

.welcome-popup h2 {
    color: var(--pink-numedikal);
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: bold;
}

.welcome-popup p {
    color: white;
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.welcome-subtitle {
    font-size: 1rem !important;
    color: var(--info-color) !important;
    margin-bottom: 30px !important;
}

.welcome-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-config-allergies {
    background: var(--pink-numedikal);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-config-allergies:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--pink-numedikal);
    background: var(--over-color);
}

.btn-plus-tard {
    background: transparent;
    color: var(--info-color);
    padding: 15px 30px;
    border: 2px solid var(--info-color);
    border-radius: 20px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-plus-tard:hover {
    color: white;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--pink-numedikal);
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 968px) {
    .infos-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Navbar */
    .navbar {
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        box-sizing: border-box;
    }
    
    .navbar .objectif-badge {
        position: static;
        transform: none;
        margin-top: 0.5rem;
        width: fit-content;
    }
    
    .navbar .nav-icons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Dashboard */
    .dashboard-container {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 0rem;
    }
    
    .conseil-text {
        line-height: 1.2;
        text-align: center;
        padding: 0.2rem;
        margin: 0 0.2rem;
    }
    
    .historique-panel {
        padding: 0rem 2rem;
        margin: 1rem auto 0rem;
        max-width: 100%;
    }
    
    /* Repas */
    .repas-container {
        margin: 0;
        grid-template-columns: 1fr;
        padding: 0;
        gap: 2rem;
    }
    
    .repas-separator {
        display: none;
    }
    
    .infos-separator {
        display: none;
    }
    
    .infos-container {
        margin: 0;
        grid-template-columns: 1fr;
        padding: 0;
    }
    
    /* Score Circle */
    .score-circle-container {
        width: 300px;
        height: 180px;
        margin: 0 auto 2rem auto;
    }
    
    /* Sliders */
    .sliders-container {
        padding: 0;
        margin-top: 1rem;
    }
    
    .repas-colonne h3 {
        font-size: 1rem;
        margin-bottom: 0rem;
    }
    
    /* Plan */
    .plan-container {
        overflow-x: scroll;
        padding: 0.5rem;
    }
    
    .plan-wrapper {
        padding: 0 5px;
        gap: 5px;
    }
    
    .nav-button {
        width: 45px;
        height: 45px;
    }
    
    .nav-button svg {
        width: 20px;
        height: 20px;
    }
    
    .plan-grid {
        min-width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    .plan-grid > *:not(.today-meal-block):not(.meal-label.today):not(.day-header.today) {
        display: none !important;
    }
    
    .day-header.today,
    .meal-label.today,
    .today-meal-block {
        display: flex !important;
        grid-column: span 1;
        width: 100%;
    }
    
    .today-aliments-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .today-aliment-card {
        margin: 3px;
        padding: 0.5rem 0.3rem;
    }
    
    .today-aliment-card img {
        height: 40px;
    }
    
    .today-aliment-card:first-child {
        grid-row: auto;
    }
    
    .today-aliment-card:first-child img {
        height: 80px;
    }
    
    .today-aliment-card .nom {
        font-size: 0.7rem;
    }
    
    .mini-chart-container {
        margin: auto 0.5rem;
    }
    
    /* InfosPerso - Allergies */
    
    allergies-buttons {
        gap: 0.5rem;
    }
    
    .allergie-toggle-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
    }
    /* Register */
    .btn-suivant {
        font-size: 0.7rem;
    }
}

@media (max-width: 650px) {
    .register-container {
        margin: 0% 5%;
        padding: 5% 5%;
    }
}

@media (max-width: 400px) {
    .register-container {
        margin: 5%;
        padding: 5% 5%;
        border-radius: 30px;
    }
    
    .option-btn-gender {
        width: auto;
        padding: 9px 12px;
        font-size: 1em;
    }
    
    .allergie-toggle-btn {
        flex: 1 1 100%;
    }
}