
/* =========================
   ÉLÉMENTS MOBILE : CACHÉS PAR DÉFAUT (DESKTOP)
========================= */

.planning-mobile-header,
.jour-card,
.save-mobile {
    display: none;
}

/* =========================
   BASE
========================= */

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background-color: #fefefe;
    color: #333;
}

/* =========================
   EN-TÊTE
========================= */

header {
    background: linear-gradient(135deg, #6dd5ed, #2193b0);
    color: white;
    padding: 30px 20px;
    text-align: center;
    font-size: 24px;
    letter-spacing: 1px;
}

/* =========================
   MENU DESKTOP
========================= */

.menu {
    display: flex;
    justify-content: center;
    gap: 20px;
    background-color: #e8f6f9;
    padding: 15px;
}

.menu button {
    background: #4caf50;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.menu button:hover {
    background-color: #43a047;
    transform: scale(1.05);
}

/* =========================
   CONTENU GÉNÉRAL
========================= */

main {
    padding: 10px 15px 0px 15px;
    text-align: center;
}

.hidden {
    display: none;
}

/* =========================
   PLANNING DES REPAS
========================= */

.planning {
    margin: 30px auto;
    border-collapse: collapse;
    width: 95%;
    max-width: 1100px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.planning th {
    background-color: #2193b0;
    color: white;
    padding: 12px;
}

.planning td {
    border-bottom: 1px solid #eee;
    padding: 8px;
}

textarea {
    width: 100%;
    height: 70px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px;
    font-family: inherit;
    resize: vertical;
}

/* Bouton sauvegarde */
.save {
    margin:25px auto 40px auto;
    display:block;
    background-color: #ff9800;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 25px;
    cursor: pointer;
}

.save:hover {
    background-color: #fb8c00;
}

/* Flèches semaine */
.planning-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.fleche {
    background: none;
    border: none;
    font-size: 40px;
    cursor: pointer;
    color: #2193b0;
}

/* Couleurs repas */
.repas-viande { background-color: #fdecea; }
.repas-poisson { background-color: #e3f2fd; }
.repas-oeuf { background-color: #fff9c4; }
.repas-mixte { background-color: #ffe0b2; }

/* =========================
   OBJECTIFS
========================= */

.todo-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.todo-form input,
.todo-form select {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ccc;
}

#todo-liste li {
    list-style: none;
    background: #e8f6f9;
    margin: 10px auto;
    padding: 14px 20px;
    max-width: 700px;
    border-radius: 14px;
    text-align: left;
}

#todo-liste li.alerte {
    background-color: #fdecea;
    border-left: 6px solid #e53935;
}

#todo-liste li.alerte strong {
    color: #c62828;
}

/* =========================
   TOAST
========================= */

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #4caf50;
    color: white;
    padding: 16px 28px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.toast.hidden {
    opacity: 0;
    pointer-events: none;
}



/* =========================
   PAGE DE CONNEXION
========================= */

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #00b4d8, #48cae4);
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.login-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.login-form button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #00b4d8;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

/* =========================
   ACCUEIL DESKTOP
========================= */

.accueil-desktop {
    padding: 80px 20px;
    text-align: center;
    background: #fefefe;
}

.accueil-desktop h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.accueil-desktop p {
    font-size: 18px;
    color: #555;
}

/* pas de boutons sur desktop */
.home-actions {
    display: none;
}

/* =========================
   MENU MOBILE
========================= */

.mobile-nav {
    display: none;
}

/* =========================
   MODE MOBILE
========================= */
/* =========================
   VERSION MOBILE PROPRE
========================= */

.mobile-only,
.planning-mobile-header,
.save-mobile {
    display: none;
}

@media (max-width: 768px) {

    /* cacher desktop */
    .menu {
        display: none;
    }

    .planning-wrapper {
        display: none;
    }

    /* afficher mobile */
    .mobile-only {
        display: block;
    }

    main {
        padding: 15px;
    }

    header {
        padding: 15px 10px;
    }

    header h1 {
        font-size: 18px;
    }

    h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    /* HEADER JOUR */

    .planning-mobile-header {
    display:flex;
    justify-content:space-between;
    align-items:center;

    background:linear-gradient(135deg,#6dd5ed,#2193b0);
    color:white;

    padding:12px 14px;
    border-radius:18px;

    margin:5px 10px 10px 10px;
    }
    .planning-mobile{
    margin:5px 10px 8px 10px;
    }
    .planning-mobile-header button{
        background:none;
        border:none;
        color:white;
        font-size:24px;
    }

    #mobile-date{
        font-size:16px;
        font-weight:600;
    }

    #mobile-semaine{
        font-size:13px;
        opacity:0.9;
    }

    /* CARTE JOUR */

    .jour-card{
        display:none;
        background:white;
        border-radius:20px;
        padding:15px;
        box-shadow:0 5px 15px rgba(0,0,0,0.1);
        margin-bottom:15px;
    }

    .jour-card textarea{
        width:100%;
        min-height:60px;
        margin-bottom:10px;
        border-radius:12px;
        padding:10px;
        border:1px solid #ddd;
        box-sizing:border-box;
        font-size:15px;
    }

    /* SAUVEGARDE */

    .save-mobile{

    display:block;

    margin:10px auto 15px auto;

    padding:14px 30px;

    border-radius:40px;

    font-size:16px;

    background:#ff9800;
    color:white;
    border:none;

    box-shadow:0 5px 15px rgba(0,0,0,0.2);

    }
    #repas h2{
    margin-bottom:5px;
    }
    /* MENU BAS (IMPORTANT) */

    .mobile-nav{
        position:fixed;
        bottom:10px;
        left:12px;
        right:12px;
        height:65px;
        background:white;
        display:flex;
        justify-content:space-around;
        align-items:center;
        border-radius:20px;
        box-shadow:0 -5px 20px rgba(0,0,0,0.15);
        z-index:1000;
    }

    .mobile-nav button{
        background:none;
        border:none;
        font-size:26px;
    }

    /* ACCUEIL BLEU */

    #accueil{
        background:linear-gradient(135deg,#6dd5ed,#2193b0);
        color:white;
        padding:30px 20px 100px;
    }

}
/* =========================
   OBJECTIFS MOBILE PROPRE
========================= */

@media (max-width:768px){

/* FORMULAIRE */

.todo-form{
flex-direction:column;
gap:10px;
margin:10px 10px 15px 10px;
}

.todo-form input,
.todo-form select{

width:100%;

padding:14px;

font-size:16px;

border-radius:14px;

box-sizing:border-box;

}


/* BOUTON AJOUTER */

.todo-form button{

width:100%;

padding:14px;

font-size:16px;

border-radius:20px;

background:#4caf50;

color:white;

border:none;

}


/* LISTE OBJECTIFS */

#todo-liste{

padding:0;

margin:0 10px 10px 10px;

}


#todo-liste li{

margin-bottom:10px;

padding:16px;

border-radius:18px;

background:white;

box-shadow:0 5px 15px rgba(0,0,0,0.08);

font-size:16px;

}


/* CHECKBOX PLUS GROS */

#todo-liste input[type="checkbox"]{

transform:scale(1.3);

margin-right:10px;

}


/* BOUTON SAUVEGARDE */

#objectifs .save{

display:block;

margin:15px auto 100px auto;

padding:14px 35px;

border-radius:40px;

font-size:17px;

}


}
/* TRI OBJECTIFS */

.tri-objectifs{

margin:10px auto;

font-size:14px;

}

.tri-objectifs select{

padding:6px 12px;

border-radius:10px;

border:1px solid #ccc;

}


/* MOBILE TRI */

@media(max-width:768px){

.tri-objectifs{

margin:5px 10px 10px 10px;

text-align:left;

}

.tri-objectifs select{

width:100%;

padding:12px;

font-size:15px;

border-radius:12px;

}

}
/* HEADER OBJECTIFS */

/* HEADER OBJECTIFS DESKTOP */

/* HEADER OBJECTIFS PROPRE */

/* ===== HEADER OBJECTIFS ===== */

.objectifs-header{

display:flex;
align-items:center;
justify-content:space-between;

max-width:700px;
margin:20px auto;

position:relative;

}

/* Titre centré */

.objectifs-header h2{

margin:0 auto;
text-align:center;

}

/* Tri à droite */

.tri-objectifs{

position:absolute;
right:0;

}

.tri-objectifs select{

padding:6px 10px;
border-radius:8px;
font-size:14px;

}

/* TRI COMPACT */




/* MOBILE */

@media(max-width:768px){


/* HEADER OBJECTIFS MOBILE */

    .objectifs-header{
        max-width:100%;
        padding:0 10px;
    }

/* titre normal */

    .objectifs-header h2{
        font-size: 30px;
        margin:0 auto;
    }

/* tri reste à droite */

    .tri-objectifs{
        position:static;
        right:0;
    }

}
/* =========================
PARAMETRES
========================= */

.profil-box{

display:flex;
align-items:center;
gap:20px;

justify-content:center;

margin:20px 0;

}

.avatar{

width:70px;
height:70px;

border-radius:50%;

background:#e8f6f9;

display:flex;

align-items:center;
justify-content:center;

font-size:30px;

margin-bottom:10px;

}

#famille-grid{

display:flex;

gap:20px;

justify-content:center;

flex-wrap:wrap;

margin:20px 0;

}

.membre-card{

text-align:center;

}
/* FORMULAIRE MEMBRE */

.membre-form{

max-width:400px;
margin:20px auto;

display:flex;
flex-direction:column;

gap:10px;

}

.membre-form input{

padding:12px;

border-radius:10px;

border:1px solid #ccc;

font-size:16px;

}

.membre-form button{

padding:12px;

border-radius:10px;

border:none;

background:#4CAF50;

color:white;

font-size:16px;

cursor:pointer;

}
.membre-card{

width:110px;

padding:15px;

border-radius:15px;

background:white;

box-shadow:0 2px 5px rgba(0,0,0,0.1);

text-align:center;

display:flex;

flex-direction:column;

align-items:center;

justify-content:center;

}
/* MENU PARAMETRES */

.param-menu{

display:flex;

justify-content:center;

gap:10px;

margin:20px 0;

}

.param-tab{

padding:12px 20px;

background:white;

border-radius:20px;

cursor:pointer;

box-shadow:0 2px 5px rgba(0,0,0,0.1);

}

.param-tab.active{

background:#4CAF50;

color:white;

}
.btn-danger{

background:#e74c3c;

color:white;

border:none;

padding:10px 18px;

border-radius:20px;

cursor:pointer;

font-size:14px;

}

.btn-danger:hover{

background:#c0392b;

}
.famille-grid{

display:flex;

gap:20px;

justify-content:center;

flex-wrap:wrap;

margin-top:20px;

}