/* ==========================================================
   Ma Maisonnette — styles
   ========================================================== */

:root {
    --fond: #F4F5F1;
    --surface: #FFFFFF;
    --texte: #1C2420;
    --texte-doux: #5B6660;
    --texte-moyen: #3E4A44;
    --bordure: #E3E6E1;
    --bordure-legere: #EEF0EC;
    --vert: #1F6B4F;
    --vert-fonce: #164D39;
    --vert-clair: #E7F3EE;
    --jaune: #F2C14E;
    --sable: #FCEFD6;
    --sable-texte: #6E4A00;
    --erreur: #A3243F;
    --erreur-fond: #FDE8EC;
    --rayon: 16px;
    --police-titre: 'Outfit', system-ui, sans-serif;
    --police-texte: 'Inter', system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--fond);
    color: var(--texte);
    font-family: var(--police-texte);
    font-size: 16px;
    line-height: 1.45;
}

a {
    color: var(--vert);
}

a:hover {
    color: var(--vert-fonce);
}

h1,
h2,
p {
    margin: 0;
}

[hidden] {
    display: none !important;
}

/* ---------- Pages Connexion / Inscription ---------- */

.auth {
    min-height: 100vh;
    max-width: 440px;
    margin: 0 auto;
    padding: 40px 20px 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.auth-marque {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--vert);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.auth-nom {
    font-family: var(--police-titre);
    font-size: 22px;
    font-weight: 700;
}

.auth-slogan {
    font-size: 14px;
    color: var(--texte-doux);
}

.auth-titre {
    font-family: var(--police-titre);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.4px;
    line-height: 1.15;
}

.auth-intro {
    margin-top: 8px;
    font-size: 15px;
    color: var(--texte-doux);
}

.auth-bas {
    margin-top: auto;
    text-align: center;
    font-size: 15px;
    color: var(--texte-doux);
}

.auth-bas a {
    font-weight: 600;
}

/* ---------- Formulaires ---------- */

.formulaire {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.champ {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.champ label {
    font-size: 14px;
    font-weight: 600;
}

.champ input {
    height: 52px;
    width: 100%;
    border-radius: 14px;
    border: 1px solid #C9CFC9;
    background: var(--surface);
    padding: 0 16px;
    font-family: var(--police-texte);
    font-size: 16px;
    color: var(--texte);
}

.champ input:focus {
    outline: none;
    border: 2px solid var(--vert);
    padding: 0 15px;
}

.champ-aide {
    font-size: 13px;
    color: var(--texte-doux);
}

.champ ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: var(--erreur);
}

.alerte {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    background: var(--erreur-fond);
    color: var(--erreur);
}

.alerte-succes {
    background: var(--vert-clair);
    color: var(--vert);
}

/* ---------- Boutons ---------- */

.bouton {
    height: 56px;
    width: 100%;
    border-radius: var(--rayon);
    border: none;
    padding: 0 20px;
    font-family: var(--police-texte);
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}

.bouton:disabled {
    opacity: 0.6;
    cursor: wait;
}

.bouton-principal {
    background: var(--vert);
    color: #FFFFFF;
}

.bouton-principal:hover {
    background: var(--vert-fonce);
    color: #FFFFFF;
}

.bouton-secondaire {
    background: var(--surface);
    color: var(--texte);
    border: 1px solid #C9CFC9;
}

.bouton-secondaire:hover {
    border-color: var(--vert);
    color: var(--texte);
}

.separateur {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--texte-doux);
}

.separateur::before,
.separateur::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--bordure);
}

.empreinte {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empreinte-message {
    font-size: 14px;
    color: var(--texte-moyen);
    text-align: center;
}

.empreinte-message:empty {
    display: none;
}

/* ---------- Application (pages connectées) ---------- */

.app {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 20px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.app-entete {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.app-date {
    font-size: 14px;
    color: var(--texte-doux);
}

.app-titre {
    font-family: var(--police-titre);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.lien-discret {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    color: var(--texte-doux);
}

.carte {
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.carte-titre {
    font-family: var(--police-titre);
    font-size: 19px;
    font-weight: 600;
}

.carte-texte {
    font-size: 15px;
    color: var(--texte-moyen);
}

.carte-sable {
    background: var(--sable);
    border-color: var(--sable);
}

.carte-sable .carte-texte {
    color: var(--sable-texte);
}

/* ---------- Premier démarrage ---------- */

.etapes {
    display: flex;
    align-items: center;
    gap: 12px;
}

.etapes-texte {
    font-size: 13px;
    font-weight: 600;
    color: var(--texte-doux);
    white-space: nowrap;
}

.etapes-barre {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.etapes-trait {
    height: 6px;
    border-radius: 3px;
    background: #D5DAD4;
}

.etapes-trait-fait {
    background: var(--vert);
}

.pied-etape {
    margin-top: auto;
    display: flex;
    gap: 10px;
}

.pied-etape-double {
    margin-top: 8px;
}

.bouton-retour {
    flex: 0 0 110px;
}

/* Membres du foyer */

.membres {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.membre {
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 12px 12px 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.membre-infos {
    flex: 1;
    min-width: 0;
}

.membre-prenom {
    font-size: 16px;
    font-weight: 600;
}

.membre-moi {
    font-weight: 400;
    color: var(--texte-doux);
}

.membre-role {
    font-size: 13px;
    color: var(--texte-doux);
}

.avatar {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 50%;
    background: #2563C9;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Couleurs des membres (liste dans Membre::COULEURS) */
.avatar[data-couleur="#2563C9"] { background: #2563C9; }
.avatar[data-couleur="#B45309"] { background: #B45309; }
.avatar[data-couleur="#7C3AED"] { background: #7C3AED; }
.avatar[data-couleur="#0F766E"] { background: #0F766E; }
.avatar[data-couleur="#BE185D"] { background: #BE185D; }
.avatar[data-couleur="#4D7C0F"] { background: #4D7C0F; }

.bouton-icone {
    width: 44px;
    height: 44px;
    flex: none;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--texte-doux);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.bouton-icone:hover {
    background: var(--erreur-fond);
    color: var(--erreur);
}

/* Cases à cocher et tuiles */

.groupe {
    border: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.groupe-titre {
    padding: 0;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.tuiles {
    display: grid;
    gap: 10px;
}

.tuiles-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tuile,
.case {
    position: relative;
    cursor: pointer;
}

.tuile input,
.case input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.tuile-contenu {
    height: 96px;
    border-radius: 18px;
    border: 1px solid var(--bordure);
    background: var(--surface);
    color: var(--texte-moyen);
    font-size: 15px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tuile input:checked + .tuile-contenu {
    border: 2px solid var(--vert);
    background: var(--vert-clair);
    color: var(--vert);
    font-weight: 600;
}

.tuile input:focus-visible + .tuile-contenu,
.case input:focus-visible + .case-boite {
    outline: 3px solid var(--jaune);
    outline-offset: 2px;
}

.case {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.case-boite {
    width: 22px;
    height: 22px;
    flex: none;
    border-radius: 6px;
    border: 2px solid #B9C0BA;
    background: var(--surface);
}

.case input:checked + .case-boite {
    border-color: var(--vert);
    background: var(--vert) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.case-tuile {
    height: 52px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--bordure);
    background: var(--surface);
}

.case-tuile:has(input:checked) {
    border: 2px solid var(--vert);
    padding: 0 13px;
    font-weight: 600;
}

/* Ajout d'un équipement libre */

.facultatif {
    font-weight: 400;
    color: var(--texte-doux);
}

.ajout-ligne {
    display: flex;
    gap: 10px;
}

.ajout-ligne input {
    flex: 1;
    min-width: 0;
}

.bouton-ajout {
    width: auto;
    height: 52px;
    flex: none;
    font-size: 16px;
}

.case-tuile span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================
   Aujourd'hui
   ========================================================== */

.app-avec-bouton {
    padding-bottom: 110px;
}

.filtres {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 -20px;
    padding: 0 20px 4px;
}

.filtre {
    height: 44px;
    flex: none;
    padding: 0 16px;
    border-radius: 22px;
    border: 1px solid var(--bordure);
    background: var(--surface);
    color: var(--texte);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filtre:hover {
    color: var(--texte);
    border-color: var(--vert);
}

.filtre-membre {
    padding-left: 4px;
}

.filtre-actif,
.filtre-actif:hover {
    background: var(--texte);
    border-color: var(--texte);
    color: #FFFFFF;
    font-weight: 600;
}

.avatar-moyen {
    width: 34px;
    height: 34px;
    font-size: 13px;
}

.avatar-petit {
    width: 32px;
    height: 32px;
    font-size: 13px;
    border: 2px solid var(--surface);
}

/* Barre de progression */

.progression {
    background: var(--vert);
    color: #FFFFFF;
    border-radius: 20px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progression-ligne {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.progression-texte {
    font-family: var(--police-titre);
    font-size: 22px;
    font-weight: 600;
}

.progression-encouragement {
    font-size: 14px;
    color: #D6EBE1;
}

.progression-jauge {
    display: block;
    width: 100%;
    height: 10px;
    border: none;
    border-radius: 5px;
    background: #3F8A6D;
    overflow: hidden;
    appearance: none;
}

.progression-jauge::-webkit-progress-bar {
    background: #3F8A6D;
    border-radius: 5px;
}

.progression-jauge::-webkit-progress-value {
    background: var(--jaune);
    border-radius: 5px;
}

.progression-jauge::-moz-progress-bar {
    background: var(--jaune);
    border-radius: 5px;
}

/* Liste des tâches */

.moment {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.moment-titre {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--texte-doux);
}

.liste-taches {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: 18px;
}

.tache {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 10px 6px;
    border-bottom: 1px solid var(--bordure-legere);
    scroll-margin-top: 80px;
}

.tache:last-child {
    border-bottom: none;
}

.tache form {
    margin: 0;
}

.coche {
    width: 44px;
    height: 44px;
    flex: none;
    border: none;
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.coche-rond {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #B9C0BA;
    background: var(--surface);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coche:hover .coche-rond {
    border-color: var(--vert);
}

.tache-faite .coche-rond {
    border-color: var(--vert);
    background: var(--vert);
}

.tache-infos {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.tache-titre {
    font-size: 16px;
    font-weight: 500;
}

.tache-faite .tache-titre {
    color: var(--texte-doux);
    text-decoration: line-through;
}

.tag {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 8px;
}

.tag-menage { background: #E7F3EE; color: #1F6B4F; }
.tag-lessive { background: #E6EEF9; color: #1E4E9E; }
.tag-rangement { background: #FDE8EC; color: #A3243F; }
.tag-repas { background: #FCEFD6; color: #8A5A00; }
.tag-maison { background: #F3EEFC; color: #5B2BB5; }

.avatars {
    display: flex;
    flex: none;
}

.avatars .avatar + .avatar {
    margin-left: -8px;
}

.vide .bouton {
    margin-top: 4px;
}

/* Bouton rond « + » */

.bouton-flottant {
    position: fixed;
    right: max(20px, calc(50% - 300px));
    bottom: 28px;
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: var(--texte);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(28, 36, 32, 0.25);
}

.bouton-flottant:hover {
    color: #FFFFFF;
    background: #000000;
}

/* ==========================================================
   Nouvelle tâche
   ========================================================== */

.app-avec-pied {
    padding-bottom: 120px;
}

.entete-retour {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: -12px;
}

.entete-retour-titre {
    font-family: var(--police-titre);
    font-size: 24px;
    font-weight: 700;
}

.formulaire-tache {
    gap: 24px;
}

.pastilles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pastille {
    position: relative;
    cursor: pointer;
}

.pastille input,
.segment input,
.jour input,
.moment-choix input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.pastille span {
    height: 40px;
    padding: 0 14px;
    border-radius: 20px;
    border: 1px solid var(--bordure);
    background: var(--surface);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
}

.pastille input:checked + span {
    border-width: 2px;
    padding: 0 13px;
    font-weight: 600;
}

.pastille-menage input:checked + span { background: #E7F3EE; border-color: #1F6B4F; color: #1F6B4F; }
.pastille-lessive input:checked + span { background: #E6EEF9; border-color: #1E4E9E; color: #1E4E9E; }
.pastille-rangement input:checked + span { background: #FDE8EC; border-color: #A3243F; color: #A3243F; }
.pastille-repas input:checked + span { background: #FCEFD6; border-color: #8A5A00; color: #8A5A00; }
.pastille-maison input:checked + span { background: #F3EEFC; border-color: #5B2BB5; color: #5B2BB5; }

.pastille input:focus-visible + span,
.segment input:focus-visible + span,
.jour input:focus-visible + span,
.moment-choix input:focus-visible + span {
    outline: 3px solid var(--jaune);
    outline-offset: 2px;
}

/* Choix des membres */

.tuiles-membres {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
}

.tuile-membre .tuile-contenu {
    height: 84px;
    font-size: 13px;
    gap: 6px;
}

.tuile-membre .avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
}

.tuile-membre input:checked + .tuile-contenu {
    background: var(--surface);
    color: var(--texte);
}

.tuile-membre input:checked + .tuile-contenu[data-couleur="#2563C9"] { border-color: #2563C9; }
.tuile-membre input:checked + .tuile-contenu[data-couleur="#B45309"] { border-color: #B45309; }
.tuile-membre input:checked + .tuile-contenu[data-couleur="#7C3AED"] { border-color: #7C3AED; }
.tuile-membre input:checked + .tuile-contenu[data-couleur="#0F766E"] { border-color: #0F766E; }
.tuile-membre input:checked + .tuile-contenu[data-couleur="#BE185D"] { border-color: #BE185D; }
.tuile-membre input:checked + .tuile-contenu[data-couleur="#4D7C0F"] { border-color: #4D7C0F; }

.case-explication {
    height: auto;
    min-height: 60px;
    padding: 10px 14px;
}

.case-explication:has(input:checked) {
    padding: 9px 13px;
}

.case-texte {
    display: flex;
    flex-direction: column;
}

.case-texte span:last-child {
    white-space: normal;
}

.case-libelle {
    font-size: 15px;
}

.case-aide {
    font-size: 13px;
    font-weight: 400;
    color: var(--texte-doux);
}

/* Fréquence, jours, moment */

.segments {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: #E9ECE7;
}

.segment {
    position: relative;
    cursor: pointer;
}

.segment span {
    height: 40px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--texte-moyen);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.segment input:checked + span {
    background: var(--surface);
    color: var(--texte);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(28, 36, 32, 0.12);
}

.bloc-jours,
.bloc-date {
    display: none;
}

.formulaire-tache:has(input[name="frequence"][value="semaine"]:checked) .bloc-jours {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.formulaire-tache:has(input[name="frequence"][value="mois"]:checked) .bloc-date,
.formulaire-tache:has(input[name="frequence"][value="une_fois"]:checked) .bloc-date {
    display: flex;
}

.jour {
    position: relative;
    cursor: pointer;
}

.jour span {
    height: 44px;
    border-radius: 22px;
    border: 1px solid var(--bordure);
    background: var(--surface);
    font-size: 14px;
    color: var(--texte-moyen);
    display: flex;
    align-items: center;
    justify-content: center;
}

.jour input:checked + span {
    border-color: var(--vert);
    background: var(--vert);
    color: #FFFFFF;
    font-weight: 600;
}

.moments {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.moment-choix {
    position: relative;
    cursor: pointer;
}

.moment-choix span {
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--bordure);
    background: var(--surface);
    font-size: 14px;
    color: var(--texte-moyen);
    display: flex;
    align-items: center;
    justify-content: center;
}

.moment-choix input:checked + span {
    border: 2px solid var(--vert);
    background: var(--vert-clair);
    color: var(--vert);
    font-weight: 600;
}

/* Bouton d'enregistrement collé en bas */

.pied-fixe {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 20px 20px;
    background: var(--fond);
    border-top: 1px solid var(--bordure);
}

.pied-fixe .bouton {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

/* Modifier / supprimer une tâche */

.tache-lien,
.tache-lien:hover {
    color: var(--texte);
    text-decoration: none;
}

.tache-lien:hover .tache-titre {
    text-decoration: underline;
}

.tache-faite .tache-lien:hover .tache-titre {
    text-decoration: line-through underline;
}

.zone-suppression {
    border-top: 1px solid var(--bordure);
    padding-top: 16px;
}

.zone-suppression-titre {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--erreur);
    cursor: pointer;
}

.zone-suppression-contenu {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bouton-danger {
    background: var(--erreur);
    color: #FFFFFF;
}

.bouton-danger:hover {
    background: #85182F;
    color: #FFFFFF;
}

/* Tâches déjà créées (bas de « Nouvelle tâche ») */

.deja {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
}

.deja .liste-taches li {
    border-bottom: 1px solid var(--bordure-legere);
}

.deja .liste-taches li:last-child {
    border-bottom: none;
}

.deja-ligne {
    padding: 12px 14px 12px 16px;
    border-bottom: none;
}

.deja-ligne:hover {
    background: #FAFBF9;
}

.deja .liste-taches {
    overflow: hidden;
}

.deja-resume {
    font-size: 13px;
    color: var(--texte-doux);
}

.deja-prochaine {
    font-size: 13px;
    font-weight: 600;
    color: var(--vert);
}

/* ==========================================================
   Barre de navigation du bas
   ========================================================== */

.app-avec-nav {
    padding-bottom: 110px;
}

.app-avec-nav.app-avec-bouton {
    padding-bottom: 180px;
}

.navigation {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background: var(--surface);
    border-top: 1px solid var(--bordure);
    padding-bottom: env(safe-area-inset-bottom);
}

.navigation-contenu {
    max-width: 640px;
    margin: 0 auto;
    height: 72px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.navigation-lien {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--texte-doux);
    text-decoration: none;
}

.navigation-lien:hover {
    color: var(--texte);
}

.navigation-lien-actif,
.navigation-lien-actif:hover {
    color: var(--vert);
    font-weight: 600;
}

/* Le bouton « + » passe au-dessus de la barre */
.app-avec-nav .bouton-flottant {
    bottom: calc(88px + env(safe-area-inset-bottom));
}

/* ==========================================================
   Qui fait quoi (semaine)
   ========================================================== */

.semaine-fleches {
    display: flex;
    gap: 4px;
}

.jours-semaine {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.jour-lien {
    position: relative;
    height: 60px;
    border-radius: 14px;
    border: 1px solid var(--bordure);
    background: var(--surface);
    color: var(--texte-doux);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.jour-lien:hover {
    color: var(--texte-doux);
    border-color: var(--vert);
}

.jour-lien-lettre {
    font-size: 12px;
}

.jour-lien-numero {
    font-size: 16px;
    font-weight: 600;
    color: var(--texte);
}

/* Petit point sous la date du jour */
.jour-lien-aujourdhui::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--vert);
}

.jour-lien-choisi,
.jour-lien-choisi:hover {
    background: var(--texte);
    border-color: var(--texte);
    color: #D7DCD8;
}

.jour-lien-choisi .jour-lien-numero {
    color: #FFFFFF;
}

.jour-lien-choisi.jour-lien-aujourdhui::after {
    background: var(--jaune);
}

.carte-entete {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.carte-compte {
    font-size: 13px;
    color: var(--texte-doux);
}

/* Équilibre entre les membres */

.equilibre {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.equilibre-ligne {
    display: flex;
    align-items: center;
    gap: 10px;
}

.equilibre-prenom {
    width: 72px;
    flex: none;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.equilibre-jauge {
    flex: 1;
    min-width: 0;
    height: 12px;
    border: none;
    border-radius: 6px;
    background: #EEF0EC;
    overflow: hidden;
    appearance: none;
}

.equilibre-jauge::-webkit-progress-bar {
    background: #EEF0EC;
    border-radius: 6px;
}

.equilibre-jauge::-webkit-progress-value {
    border-radius: 6px;
    background: #2563C9;
}

.equilibre-jauge::-moz-progress-bar {
    border-radius: 6px;
    background: #2563C9;
}

.equilibre-jauge[data-couleur="#B45309"]::-webkit-progress-value { background: #B45309; }
.equilibre-jauge[data-couleur="#7C3AED"]::-webkit-progress-value { background: #7C3AED; }
.equilibre-jauge[data-couleur="#0F766E"]::-webkit-progress-value { background: #0F766E; }
.equilibre-jauge[data-couleur="#BE185D"]::-webkit-progress-value { background: #BE185D; }
.equilibre-jauge[data-couleur="#4D7C0F"]::-webkit-progress-value { background: #4D7C0F; }
.equilibre-jauge[data-couleur="#B45309"]::-moz-progress-bar { background: #B45309; }
.equilibre-jauge[data-couleur="#7C3AED"]::-moz-progress-bar { background: #7C3AED; }
.equilibre-jauge[data-couleur="#0F766E"]::-moz-progress-bar { background: #0F766E; }
.equilibre-jauge[data-couleur="#BE185D"]::-moz-progress-bar { background: #BE185D; }
.equilibre-jauge[data-couleur="#4D7C0F"]::-moz-progress-bar { background: #4D7C0F; }

.equilibre-nombre {
    width: 24px;
    flex: none;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
}

/* Détail du jour par membre */

.membre-jour {
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: 18px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.membre-jour-entete {
    display: flex;
    align-items: center;
    gap: 10px;
}

.membre-jour-prenom {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
}

.membre-jour-etat {
    font-size: 13px;
    color: var(--texte-doux);
}

.membre-jour-etat-fini {
    color: var(--vert);
    font-weight: 600;
}

.membre-jour-taches {
    list-style: none;
    margin: 0;
    padding: 0 0 0 42px;
    display: flex;
    flex-direction: column;
}

.membre-jour-tache {
    min-height: 32px;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--texte);
    text-decoration: none;
}

.membre-jour-tache:hover {
    color: var(--texte);
    text-decoration: underline;
}

.membre-jour-tache-faite,
.membre-jour-tache-faite:hover {
    color: var(--texte-doux);
    text-decoration: line-through;
}

/* ==========================================================
   Rééquilibrer
   ========================================================== */

.bouton-clair {
    height: 48px;
    font-size: 15px;
    background: var(--vert-clair);
    color: var(--vert);
    border: 1px solid #C9D9D0;
}

.bouton-clair:hover {
    background: #D9ECE3;
    color: var(--vert-fonce);
}

.equilibre-evolution {
    flex: none;
    min-width: 74px;
    text-align: right;
    font-size: 14px;
    color: var(--texte-doux);
}

.equilibre-evolution strong {
    color: var(--texte);
}

#form-reequilibrer .liste-taches > li + li {
    border-top: 1px solid var(--bordure-legere);
}

.proposition {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
}

.proposition input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.proposition input:checked + .case-boite {
    border-color: var(--vert);
    background: var(--vert) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.proposition input:focus-visible + .case-boite {
    outline: 3px solid var(--jaune);
    outline-offset: 2px;
}

.proposition:has(input:not(:checked)) .tache-infos,
.proposition:has(input:not(:checked)) .proposition-passage {
    opacity: 0.45;
}

.proposition-passage {
    flex: none;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--texte-doux);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ==========================================================
   Repas
   ========================================================== */

.jours-repas {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.jour-repas {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jour-repas-titre {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--texte-doux);
    display: flex;
    align-items: center;
    gap: 8px;
}

.jour-repas-badge {
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 8px;
    background: var(--vert);
    color: #FFFFFF;
}

.jour-repas-passe .creneau {
    opacity: 0.6;
}

.creneaux {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.creneau {
    min-height: 64px;
    border-radius: 16px;
    padding: 10px 12px;
    text-decoration: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 8px;
    row-gap: 2px;
}

.creneau-rempli {
    background: var(--surface);
    border: 1px solid var(--bordure);
    color: var(--texte);
}

.creneau-rempli:hover {
    color: var(--texte);
    border-color: var(--vert);
}

.creneau-vide {
    border: 1.5px dashed #C9CFC9;
    color: var(--texte-doux);
}

.creneau-vide:hover {
    color: var(--vert);
    border-color: var(--vert);
    background: var(--vert-clair);
}

.creneau-moment {
    width: 100%;
    font-size: 12px;
    color: var(--texte-doux);
}

.creneau-plat {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.creneau-ajouter {
    font-size: 15px;
    font-weight: 600;
}

.avatar-vide {
    background: #E9ECE7;
    color: var(--texte-doux);
}

.champ textarea {
    width: 100%;
    border-radius: 14px;
    border: 1px solid #C9CFC9;
    background: var(--surface);
    padding: 12px 16px;
    font-family: var(--police-texte);
    font-size: 16px;
    line-height: 1.5;
    color: var(--texte);
    resize: vertical;
}

.champ textarea:focus {
    outline: none;
    border: 2px solid var(--vert);
    padding: 11px 15px;
}

.deja-ajoutes {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.deja-ajoutes-liste {
    margin: 0;
    padding-left: 20px;
    font-size: 15px;
    color: var(--texte-moyen);
}

.deja-ajoute-achete {
    color: var(--texte-doux);
    text-decoration: line-through;
}

/* ==========================================================
   Courses
   ========================================================== */

.ajout-article {
    display: flex;
    gap: 10px;
}

.ajout-article input {
    flex: 1;
    min-width: 0;
    height: 52px;
    border-radius: 14px;
    border: 1px solid #C9CFC9;
    background: var(--surface);
    padding: 0 16px;
    font-family: var(--police-texte);
    font-size: 16px;
    color: var(--texte);
}

.ajout-article input:focus {
    outline: none;
    border: 2px solid var(--vert);
    padding: 0 15px;
}

.moment-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.moment-entete form {
    margin: 0;
}

.lien-bouton {
    min-height: 44px;
    border: none;
    background: transparent;
    padding: 0;
    font-family: var(--police-texte);
    font-size: 14px;
    font-weight: 600;
    color: var(--vert);
    cursor: pointer;
}

.lien-bouton:hover {
    text-decoration: underline;
}

/* ==========================================================
   Ma maison (réglages)
   ========================================================== */

.navigation-contenu.navigation-contenu-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lien-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--vert);
}

.reglages-membres {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reglages-membre {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
}

.reglages-role {
    margin-left: auto;
    font-size: 13px;
    font-weight: 400;
    color: var(--texte-doux);
}

.pastilles-lecture {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pastille-lecture {
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 12px;
    background: #EEF1EC;
    color: var(--texte-moyen);
}

.reglage-interrupteur {
    display: flex;
    align-items: center;
    gap: 16px;
}

.reglage-interrupteur-texte {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.interrupteur {
    position: relative;
    width: 56px;
    height: 34px;
    flex: none;
    border: none;
    border-radius: 17px;
    background: #C9CFC9;
    padding: 0;
    cursor: pointer;
}

.interrupteur-rond {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 1px 3px rgba(28, 36, 32, 0.25);
}

.interrupteur-actif {
    background: var(--vert);
}

.interrupteur-actif .interrupteur-rond {
    left: auto;
    right: 4px;
}

.interrupteur:focus-visible {
    outline: 3px solid var(--jaune);
    outline-offset: 2px;
}

.reglage-etat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--vert);
}


/* ==========================================================
   Proposition d'installation (PWA)
   ========================================================== */

.banniere-installation {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    z-index: 100;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    box-shadow: 0 12px 32px rgba(28, 36, 32, 0.18);
    transform: translateY(calc(-100% - 40px));
    transition: transform 0.35s ease;
}

.banniere-installation[hidden] {
    display: none;
}

.banniere-installation-visible {
    transform: translateY(0);
}

.banniere-installation-icone {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

.banniere-installation-texte {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: var(--police-texte);
}

.banniere-installation-texte strong {
    font-family: var(--police-titre);
    font-size: 16px;
    font-weight: 600;
    color: var(--texte);
}

.banniere-installation-texte span {
    font-size: 13px;
    line-height: 1.35;
    color: var(--texte-doux);
}

.banniere-installation-bouton {
    flex-shrink: 0;
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: var(--vert);
    color: #FFFFFF;
    font-family: var(--police-texte);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.banniere-installation-bouton:hover {
    background: var(--vert-fonce);
}

.banniere-installation-fermer {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--texte-doux);
    cursor: pointer;
}

.banniere-installation-bouton:focus-visible,
.banniere-installation-fermer:focus-visible {
    outline: 3px solid var(--jaune);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .banniere-installation {
        transition: none;
    }
}


/* ==========================================================
   Invitations
   ========================================================== */

.reglages-membre-texte {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.reglages-statut {
    font-size: 13px;
    font-weight: 400;
    color: var(--texte-doux);
}

.reglages-inviter {
    margin-left: auto;
}

.invitation {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.invitation-membre {
    display: flex;
    align-items: center;
    gap: 14px;
}

.invitation-membre .avatar {
    flex-shrink: 0;
}

.invitation .champ input {
    font-size: 14px;
    color: var(--texte-moyen);
    text-overflow: ellipsis;
}

.invitation .bouton[hidden] {
    display: none;
}

.invitation-message {
    margin: 0;
    min-height: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--vert);
}

.invitation .champ-aide {
    margin: 0;
}

.invitation-renouveler {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 0 4px;
}

.invitation-renouveler .champ-aide {
    margin: 0;
}
