/* Page « Moi » : s'appuie sur les jetons et composants de hub.css (en-tête, barre du bas,
   formules Illico+) et ajoute le profil, la carte Illico+, les réglages en liste. */

main.moi { gap: 16px; }

/* ── Messages ── */
.bulle { margin: 0; padding: 12px 16px; border-radius: 16px; font-weight: 600; font-size: 14px; }
.bulle.ok { background: var(--vert-fond); color: var(--vert); }
.bulle.err { background: var(--rouge-fond); color: var(--rouge); }

/* ── Profil ── */
.profil { display: flex; align-items: center; gap: 14px; padding-top: 4px; }
.avatar {
    flex: none; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, #FFB36B, #FF5E7E); color: #fff; font: 800 26px var(--titre);
    box-shadow: 0 10px 22px -10px rgba(255, 94, 126, .8);
}
.profil .bloc { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.profil strong { font: 700 19px var(--titre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.formule-badge { flex: none; font-size: 12px; font-weight: 800; letter-spacing: .03em; border-radius: 999px; padding: 6px 11px; background: var(--trait); color: var(--gris); }
.formule-badge.plus { background: linear-gradient(135deg, var(--or), #FF9F43); color: #3A2200; }

/* ── Carte Illico+ (sombre, comme la feuille d'abonnement du hub) ── */
.carte-plus {
    border-radius: 26px; padding: 20px 18px; color: #fff; display: grid; gap: 14px;
    background: radial-gradient(circle at 100% 0%, rgba(124, 92, 255, .85) 0, transparent 55%),
                radial-gradient(circle at 0% 110%, rgba(255, 94, 156, .5) 0, transparent 50%), var(--nuit);
    box-shadow: 0 22px 40px -22px rgba(23, 21, 61, .9);
}
.plus-haut { display: flex; align-items: center; gap: 12px; }
.plus-haut small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--or); }
.plus-haut strong { font: 700 20px/1.2 var(--titre); }
.plus-ico { flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(135deg, var(--or), #FF9F43); }
.plus-ico svg { width: 24px; height: 24px; fill: #3A2200; stroke: none; }
.plus-chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.plus-chiffres div { background: rgba(255, 255, 255, .1); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; }
.plus-chiffres b { font: 800 22px var(--titre); font-variant-numeric: tabular-nums; }
.plus-chiffres span { font-size: 12px; color: #C9C6EE; font-weight: 600; }
.plus-bouton { width: 100%; min-height: 50px; border: 0; border-radius: 999px; background: #fff; color: var(--nuit); font: 700 16px var(--titre); }
.plus-note { margin: 0; font-size: 12px; color: #A9A5D6; text-align: center; }
.carte-plus .formules { display: grid; gap: 10px; }

/* ── Pas connecté ── */
.accueil-moi { text-align: center; display: grid; gap: 8px; justify-items: center; padding: 6px 8px 2px; }
.accueil-moi h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.accueil-moi p { margin: 0; color: var(--gris); font-size: 15px; max-width: 36ch; }
.pile-icones { display: flex; justify-content: center; padding: 6px 0 10px; }
.pile-icones span {
    width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin: 0 -6px;
    border: 3px solid var(--fond); box-shadow: 0 10px 18px -10px rgba(30, 40, 90, .5);
    transform: rotate(calc((var(--i) - 2) * 6deg)) translateY(calc((var(--i) - 2) * (var(--i) - 2) * 3px));
}
.pile-icones svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 4.4; stroke-linecap: round; stroke-linejoin: round; }

/* ── Panneaux et formulaires ── */
.panneau { background: var(--carte); border-radius: 24px; padding: 18px; box-shadow: var(--ombre); display: grid; gap: 12px; }
.panneau h3, .panneau summary { margin: 0; font: 700 17px var(--titre); display: flex; align-items: center; gap: 10px; }
.panneau h3 svg, .panneau summary > svg:first-child { width: 22px; height: 22px; fill: none; stroke: var(--bleu); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.formulaire { display: grid; gap: 12px; }
.champ { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.champ input {
    width: 100%; min-height: 50px; border: 2px solid transparent; border-radius: 14px; padding: 12px 14px;
    background: var(--trait); font-size: 16px; font-weight: 500; color: var(--encre);
}
.champ input:focus { outline: none; border-color: var(--bleu); background: var(--carte); }
.champ input.code { text-align: center; font: 800 28px var(--titre); letter-spacing: .4em; padding-left: calc(14px + .4em); }
.champ .aide { font-size: 12px; font-weight: 500; color: var(--gris); }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.principal {
    min-height: 50px; border: 0; border-radius: 999px; padding: 12px 20px; font: 700 16px var(--titre);
    background: linear-gradient(135deg, var(--bleu), var(--bleu-2)); color: #fff; box-shadow: 0 10px 20px -10px rgba(27, 77, 234, .8);
}
.principal.rouge { background: var(--rouge); box-shadow: none; }
.principal.rouge-doux { background: var(--rouge-fond); color: var(--rouge); box-shadow: none; width: 100%; }
.lien { border: 0; background: none; color: var(--bleu); font-weight: 700; padding: 6px; }
.ligne-lien { text-align: center; }
.petit { margin: 0; font-size: 13px; color: var(--gris); line-height: 1.45; }
.case { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.case input { width: 20px; height: 20px; accent-color: var(--rouge); }

/* ── Volets <details> ── */
details summary { list-style: none; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }
details summary > svg:last-child { margin-left: auto; width: 18px; height: 18px; fill: none; stroke: var(--gris-clair); stroke-width: 2.4; stroke-linecap: round; transition: transform .2s; }
details[open] summary > svg:last-child { transform: rotate(90deg); }
.repli[open] { gap: 14px; }

/* ── Réglages en liste ── */
.titre-reglages { font-size: 18px; padding: 6px 4px 0; }
.reglages { background: var(--carte); border-radius: 24px; box-shadow: var(--ombre); overflow: hidden; }
.reglage + .reglage, .reglage + .reglage-form, .reglage-form + .reglage { border-top: 1px solid var(--trait); }
.reglage summary, .reglage-bouton { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.reglage-bouton { width: 100%; border: 0; background: transparent; text-align: left; color: var(--encre); }
.reglage summary:hover, .reglage-bouton:hover { background: color-mix(in srgb, var(--trait) 45%, transparent); }
.texte { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.texte b { font-size: 15px; font-weight: 700; }
.texte small { font-size: 12px; color: var(--gris); font-weight: 500; }
.reglage.danger .texte b { color: var(--rouge); }
.reglage .contenu { padding: 0 16px 18px; display: grid; gap: 12px; }
.pastille-reglage { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.pastille-reglage svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.pastille-reglage.bleu { background: linear-gradient(135deg, #5AB2FF, #2F6BFF); }
.pastille-reglage.vert { background: linear-gradient(135deg, #3EE0A8, #11A97A); }
.pastille-reglage.violet { background: linear-gradient(135deg, #C4A1FF, #8B5CF6); }
.pastille-reglage.rouge { background: linear-gradient(135deg, #FF8FA3, #E5384F); }
.pastille-reglage.gris { background: var(--trait); color: var(--gris); }
.appareil { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.petit-bouton { border: 0; border-radius: 999px; padding: 8px 12px; font-weight: 700; font-size: 13px; background: var(--trait); color: var(--encre); }

/* ── Confiance ── */
.confiance { margin: 4px 0 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: var(--gris); text-align: center; }
.confiance svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--vert); stroke-width: 2.2; stroke-linejoin: round; }

/* ── Effacer : confirmation dans la page (assets/appareil.js) ── */
.effacer-confirmation { display: grid; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--rouge-fond); }
.effacer-confirmation > p { margin: 0; font-weight: 600; color: var(--rouge); font-size: 14px; }
.effacer-confirmation > p.alerte.vert { color: var(--vert); }
.effacer-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.effacer-actions .btn { border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: 14px; }
.effacer-oui { background: var(--rouge); color: #fff; }
.effacer-non { background: var(--carte); color: var(--encre); }

/* ── Google et séparateur ── */
.bouton-google {
    display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; border-radius: 999px;
    background: #fff; color: #1F1F1F; border: 1.5px solid #DADCE0; text-decoration: none; font: 600 16px var(--texte);
    box-shadow: 0 6px 14px -10px rgba(30, 40, 90, .5);
}
.bouton-google:hover { background: #F8F9FB; }
.logo-google { width: 20px; height: 20px; flex: none; }
.separateur { margin: 2px 0; display: flex; align-items: center; gap: 12px; color: var(--gris); font-size: 13px; font-weight: 600; }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: var(--trait); }
.ligne-liens { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.lien.gris { color: var(--gris); }
.mise-en-avant { border: 2px solid color-mix(in srgb, var(--bleu) 30%, transparent); }
.mise-en-avant summary { color: var(--bleu); }

/* ── Colonnes : empilées sur téléphone, côte à côte sur tablette et ordinateur ── */
.col-gauche, .col-droite { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 860px) {
    main.moi { max-width: 1000px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px 32px; align-items: start; }
    main.moi > .bulle, main.moi > .confiance { grid-column: 1 / -1; }
    .col-gauche { position: sticky; top: max(24px, env(safe-area-inset-top)); }
    .accueil-moi { text-align: left; justify-items: start; padding-top: 18px; }
    .accueil-moi h2 { font-size: 28px; }
    .pile-icones { justify-content: flex-start; padding-left: 8px; }
    .profil { padding-top: 10px; }
    .titre-reglages { padding-top: 14px; }
}

.liens-legaux { margin: 0; text-align: center; font-size: 12px; color: var(--gris); }
.liens-legaux a { color: var(--gris); font-weight: 600; }
.plus-note a { color: #fff; font-weight: 700; }
.lien-resilier { border: 0; background: none; color: #C9C6EE; font-weight: 600; font-size: 14px; text-decoration: underline; padding: 6px; }
