/* --------------------------------------------------------------------------
   La nouvelle présentation « pour tout le monde » (28/10/2026, migration 082,
   docs/NOUVELLE-PRESENTATION.md). Tout est sous body.nouvelle : sans elle,
   cette feuille ne change rien, et l'ancienne présentation reste celle de
   tout le monde.

   Les règles : de gros textes (18 px au moins), de grands boutons (56 px au
   moins), un mot avec chaque bouton (le « Retour » écrit en toutes lettres),
   des cartes bordées plutôt qu'ombrées, un contraste franc. La taille du
   texte se règle par personne (data-taille 1, 2, 3).
   -------------------------------------------------------------------------- */

body.nouvelle {
    --cible: 56px;
    --rayon: 18px;
    --rayon-grand: 24px;
    --texte-doux: #5c544c;
    --bordure: #e2d9cc;
    font-size: 18px;
    line-height: 1.5;
}

:root[data-theme="sombre"] body.nouvelle {
    --texte-doux: #b9b0a6;
    --bordure: #3a4047;
}

/* La taille du texte, choisie par personne : tout l'écran grandit, la barre
   du bas comprise. Pour toutes les présentations depuis le 29/10/2026. */
body[data-taille="2"] .application,
body[data-taille="2"] .navigation {
    zoom: 1.12;
}

body[data-taille="3"] .application,
body[data-taille="3"] .navigation {
    zoom: 1.25;
}

body.nouvelle h1 {
    font-size: 2rem;
    line-height: 1.15;
}

body.nouvelle h2 {
    font-size: 1.2rem;
}

/* ----------------------------------------------------------- les boutons */

body.nouvelle button {
    min-height: var(--cible);
    font-weight: 650;
}

body.nouvelle .bouton-principal {
    min-height: 60px;
    font-size: 1.08rem;
    border-radius: 20px;
    box-shadow: none;
}

body.nouvelle .bouton-discret {
    color: var(--texte);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Le retour, écrit en toutes lettres : la flèche seule ne se devine pas. */
body.nouvelle .bouton-rond.bouton-retour {
    flex: 0 0 auto;
    flex-basis: auto;
    width: auto;
    height: 52px;
    padding: 0 18px 0 12px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: inset 0 0 0 2px var(--bordure);
    font-weight: 700;
}

body.nouvelle .bouton-rond.bouton-retour::after {
    content: attr(aria-label);
}

body.nouvelle .bouton-rond {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    box-shadow: inset 0 0 0 2px var(--bordure);
}

body.nouvelle .barre {
    min-height: 60px;
    flex-wrap: wrap;
}

body.nouvelle .barre-titre strong {
    font-size: 1.6rem;
    white-space: normal;
}

/* ---------------------------------------------------- champs et cartes */

body.nouvelle input,
body.nouvelle select,
body.nouvelle textarea {
    min-height: 60px;
    font-size: 1.05rem;
    border: 2px solid var(--bordure);
    background: var(--fond-carte);
}

body.nouvelle textarea {
    padding-top: 12px;
}

body.nouvelle .carte,
body.nouvelle .ligne {
    box-shadow: none;
    border: 2px solid var(--bordure);
}

body.nouvelle .ligne {
    min-height: 76px;
}

body.nouvelle .ligne-texte span,
body.nouvelle .doux,
body.nouvelle small {
    font-size: .95rem;
}

body.nouvelle .filtre {
    min-height: 52px;
    font-size: 1rem;
}

body.nouvelle .titre-section {
    font-size: 1.15rem;
}

/* --------------------------------------------------------- la barre du bas */

body.nouvelle .navigation-onglets {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

body.nouvelle .onglet {
    min-height: 66px;
    font-size: .95rem;
    font-weight: 700;
    color: var(--texte);
    border-radius: 20px;
}

/* « Ajouter », au milieu, en plein : le geste le plus fréquent. */
body.nouvelle .onglet:nth-child(2) {
    background: #0b5d4b;
    color: #ffffff;
}

:root[data-theme="sombre"] body.nouvelle .onglet:nth-child(2) {
    background: #5dcaa5;
    color: #06231c;
}

body.nouvelle .onglet[aria-current="page"]:not(:nth-child(2)) {
    background: var(--accent-fond);
    color: var(--accent-encre);
}

body.nouvelle.avec-navigation .application {
    padding-bottom: calc(110px + env(safe-area-inset-bottom));
}

@media (min-width: 900px) {
    body.nouvelle .navigation-onglets {
        grid-template-columns: 1fr;
    }

    body.nouvelle.avec-navigation .application {
        padding-bottom: var(--espace);
    }
}

/* ----------------------------------------------------------------- l'Accueil */

body.nouvelle .salut-texte strong {
    font-size: 2rem;
}

body.nouvelle .salut-texte span {
    font-size: 1.05rem;
}

body.nouvelle .widgets {
    gap: 12px;
}

body.nouvelle .widget {
    min-height: 132px;
    padding: 18px;
    border: 2px solid var(--bordure);
}

/* Le repli d'abord (la bordure neutre, des deux thèmes), color-mix() sous
   @supports : Safari d'iOS 15 à 16.1 la perdait au calcul, repli compris. */
@supports (color: color-mix(in srgb, red, blue)) {
    body.nouvelle .widget {
        border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent);
    }
}

body.nouvelle .widget-etiquette {
    font-size: .95rem;
    opacity: 1;
}

body.nouvelle .widget-titre {
    font-size: 1.3rem;
}

body.nouvelle .widget-detail {
    font-size: 1rem;
    opacity: 1;
}

/* « L'essentiel » (un aîné) : la journée, le frigo et la météo ; une carte
   par ligne, rien d'autre. */
body.essentiel .widgets {
    grid-template-columns: 1fr;
}

body.essentiel .widget:not(.teinte-agenda):not(.teinte-mots):not(.teinte-repas):not(.teinte-aines) {
    display: none;
}

body.essentiel .salut-actions .bouton-rond:not(:last-child) {
    display: none;
}

/* ------------------------------------------------------------ les écrans « n- » */

.n-ecran {
    gap: 14px;
}

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

.n-tete h1 {
    margin: 0;
}

.n-bouton-clair {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 56px;
    padding: 0 18px;
    border-radius: 18px;
    background: var(--fond-carte);
    box-shadow: inset 0 0 0 2px var(--bordure);
    font-weight: 700;
    color: var(--texte);
}

/* « Tout » : six familles qui s'ouvrent d'un geste. */
.n-groupes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.n-groupe-tete {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 80px;
    padding: 10px 16px;
    border-radius: 22px;
    background: var(--fond-carte);
    box-shadow: inset 0 0 0 2px var(--bordure);
    text-align: left;
    color: var(--texte);
}

.n-groupe--ouvert .n-groupe-tete {
    box-shadow: inset 0 0 0 2px var(--accent);
}

.n-groupe-tete > .icone:last-child {
    transition: transform var(--duree) var(--courbe);
}

.n-groupe--ouvert .n-groupe-tete > .icone:last-child {
    transform: rotate(90deg);
}

.n-groupe-icone {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: var(--accent-fond);
    color: var(--accent-encre);
    flex: none;
}

.n-groupe-texte {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.n-groupe-texte strong {
    font-size: 1.15rem;
}

.n-groupe-texte small {
    color: var(--texte-doux);
    line-height: 1.3;
}

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

.n-lien {
    min-height: 60px;
    border-radius: 16px;
    background: var(--fond-doux);
    box-shadow: none;
    font-weight: 700;
    padding: 6px 10px;
    color: var(--texte);
}

.n-pied {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.n-pied p {
    margin: 0;
    text-align: center;
}

/* « Ajouter » : que voulez-vous faire ? */
.n-choix {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.n-choix-bouton {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-height: 76px;
    padding: 10px 16px;
    border-radius: 22px;
    background: var(--fond-carte);
    box-shadow: inset 0 0 0 2px var(--bordure);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: left;
    color: var(--texte);
}

.n-choix-icone {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--accent-fond);
    color: var(--accent-encre);
    flex: none;
}

/* L'écran « Affichage ». */
.n-confort {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.n-confort h2 {
    margin: 10px 2px 0;
}

.n-puce {
    min-height: 52px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--fond-carte);
    box-shadow: inset 0 0 0 2px var(--bordure);
    font-weight: 700;
}

.n-puce[aria-pressed="true"] {
    background: var(--accent);
    color: var(--accent-texte);
    box-shadow: none;
}

.n-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 84px;
    padding: 12px 16px;
    border-radius: 22px;
    background: var(--fond-carte);
    box-shadow: inset 0 0 0 2px var(--bordure);
    text-align: left;
    color: var(--texte);
}

.n-option[aria-pressed="true"] {
    box-shadow: inset 0 0 0 3px var(--accent);
    background: var(--accent-fond);
}

.n-option-texte {
    display: flex;
    flex-direction: column;
}

.n-option-texte strong {
    font-size: 1.15rem;
}

.n-option-texte small {
    color: var(--texte-doux);
}

.n-rond {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 3px var(--texte-doux);
    display: grid;
    place-items: center;
    flex: none;
}

.n-option[aria-pressed="true"] .n-rond {
    box-shadow: inset 0 0 0 3px var(--accent);
}

.n-option[aria-pressed="true"] .n-rond i {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    display: block;
}

.n-tailles {
    display: flex;
    gap: 8px;
}

.n-taille {
    flex: 1;
    min-height: 64px;
    border-radius: 18px;
    background: var(--fond-carte);
    box-shadow: inset 0 0 0 2px var(--bordure);
}

.n-taille[aria-pressed="true"] {
    background: var(--accent-fond);
    color: var(--accent-encre);
    box-shadow: inset 0 0 0 3px var(--accent);
}

/* La décoration (09/11/2026) : deux vignettes, un aperçu dessiné dans chacune. */
.n-decos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.n-deco {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 12px 12px;
    border-radius: 18px;
    background: var(--fond-carte);
    box-shadow: inset 0 0 0 2px var(--bordure);
    text-align: left;
}

.n-deco[aria-pressed="true"] {
    box-shadow: inset 0 0 0 3px var(--accent);
}

.n-deco small {
    color: var(--texte-doux);
    font-size: .85em;
    line-height: 1.3;
}

.n-deco-apercu {
    position: relative;
    display: block;
    width: 100%;
    height: 60px;
    margin-bottom: 6px;
    border-radius: 10px;
    background: #f7f4ef;
    box-shadow: inset 0 0 0 1px #ebe4da;
    overflow: hidden;
}

.n-deco-apercu i,
.n-deco-apercu b {
    position: absolute;
    left: 10px;
    border-radius: 5px;
}

.n-deco-apercu i {
    top: 20px;
    width: 45%;
    height: 7px;
    background: #2a2521;
}

.n-deco-apercu b {
    top: 34px;
    right: 10px;
    height: 16px;
    background: #ffffff;
}

.n-deco--noel .n-deco-apercu {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='98' height='17'%3E%3Cpath d='M0 3C16 13 33 13 49 3S82 13 98 3' fill='none' stroke='%231f6b47' stroke-width='1.4'/%3E%3Ccircle cx='15' cy='12' r='3' fill='%23b3262e'/%3E%3Ccircle cx='35' cy='12' r='3' fill='%23d9a520'/%3E%3Ccircle cx='64' cy='12' r='3' fill='%231f6b47'/%3E%3Ccircle cx='84' cy='12' r='3' fill='%23d9a520'/%3E%3C/svg%3E") repeat-x left top / 98px 17px,
        #f7f4ef;
}

.n-deco--noel .n-deco-apercu b {
    background: #b3262e;
}

.n-deco-auto {
    margin-top: 12px;
}

.n-deco-auto label {
    flex: 1;
}

.n-apercu {
    border-radius: 22px;
    background: var(--fond-doux);
    padding: 14px 16px;
}

.n-apercu p {
    margin: 0;
}

.n-apercu-texte {
    margin-top: 6px !important;
    font-weight: 700;
    line-height: 1.25;
}

/* Un rendez-vous pas à pas. */
.n-pas {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.n-etapes-barre {
    display: flex;
    gap: 6px;
}

.n-etapes-barre i {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: var(--bordure);
}

.n-etapes-barre i.fait {
    background: var(--accent);
}

.n-etape-texte {
    margin: 0;
}

.n-pas h1 {
    margin: 4px 0;
}

.n-pas p {
    margin: 4px 2px 0;
}

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

.n-pied-pas {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.n-gros {
    flex: 1;
    min-height: 64px;
    border-radius: 20px;
    background: #0b5d4b;
    color: #ffffff;
    box-shadow: none;
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.n-gros--clair {
    background: var(--fond-carte);
    color: var(--texte);
    box-shadow: inset 0 0 0 2px var(--bordure);
}

:root[data-theme="sombre"] .n-gros:not(.n-gros--clair) {
    background: #5dcaa5;
    color: #06231c;
}

.n-fini {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 30px 0 10px;
}

.n-fini p {
    margin: 0;
    font-size: 1.15rem;
}

.n-fini-rond {
    display: grid;
    place-items: center;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: var(--accent-fond);
    color: var(--accent);
}

/* L'Accueil d'un enfant : la routine en grandes images. */
.n-enfant {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.n-routine h2 {
    margin: 0 0 8px;
    font-size: 1.4rem;
}

.n-progres {
    height: 16px;
    border-radius: 8px;
    background: var(--fond-doux);
    overflow: hidden;
}

.n-progres i {
    display: block;
    height: 100%;
    border-radius: 8px;
    background: var(--accent);
}

.n-progres-texte {
    margin: 6px 0 10px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}

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

.n-etape {
    min-height: 140px;
    border-radius: 26px;
    background: var(--fond-carte);
    box-shadow: inset 0 0 0 3px var(--bordure);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--texte);
}

.n-etape[aria-pressed="true"] {
    background: #0b5d4b;
    color: #ffffff;
    box-shadow: none;
}

.n-etape-picto {
    font-size: 2.6rem;
    line-height: 1;
}

.n-rien {
    text-align: center;
    font-size: 1.2rem;
    color: var(--texte-doux);
}

.n-gros-liens {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

/* Dicter avec le micro du clavier (29/10/2026). */
.n-dictee {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 2px 0;
    font-size: .95rem;
    color: var(--texte-doux);
}

.n-dictee .icone {
    flex: none;
    color: var(--accent);
}
