/* ==========================================================================
   POTEZ — mes adresses.
   Réalisation Peexels. Feuille unique, sans dépendance, sans police distante.

   Parti pris : des caractères grands, des boutons qu'on ne peut pas rater, un
   seul geste par écran. L'outil est fait pour quelqu'un que la technique
   fatigue — tout ce qui pouvait être enlevé l'a été.
   ========================================================================== */

:root {
  --papier:        #faf7f1;
  --papier-creux:  #f2ede3;
  --carte:         #ffffff;
  --encre:         #23201c;
  --encre-douce:   #635c52;
  --encre-tenue:   #948c81;
  --trait:         #e4dccd;
  --trait-fort:    #cdc2ac;
  --ocre:          #a95e22;
  --ocre-fond:     #f7e9da;
  --olive:         #4f6136;
  --olive-fond:    #e7ecdb;
  --rouge:         #9d3535;
  --rouge-fond:    #f7e3e1;
  --bleu:          #3c5a72;
  --bleu-fond:     #e3ecf3;
  --ombre:         0 1px 2px rgba(35,32,28,.05), 0 8px 24px -14px rgba(35,32,28,.20);
  --ombre-levee:   0 2px 6px rgba(35,32,28,.08), 0 20px 44px -18px rgba(35,32,28,.32);
  --rayon:         14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --hauteur-barre: 60px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --papier: #17150f; --papier-creux: #1f1d16; --carte: #24221b;
    --encre: #f1ece1; --encre-douce: #b8afa0; --encre-tenue: #8a8274;
    --trait: #36322a; --trait-fort: #4c463a;
    --ocre: #e39a5c; --ocre-fond: #3a2a1a;
    --olive: #a9bd82; --olive-fond: #262d1c;
    --rouge: #e08b85; --rouge-fond: #3a2120;
    --bleu: #8fb6d2; --bleu-fond: #1e2a33;
    --ombre: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -14px rgba(0,0,0,.7);
    --ombre-levee: 0 2px 8px rgba(0,0,0,.5), 0 20px 44px -18px rgba(0,0,0,.85);
  }
}
:root[data-theme="dark"] {
  --papier: #17150f; --papier-creux: #1f1d16; --carte: #24221b;
  --encre: #f1ece1; --encre-douce: #b8afa0; --encre-tenue: #8a8274;
  --trait: #36322a; --trait-fort: #4c463a;
  --ocre: #e39a5c; --ocre-fond: #3a2a1a;
  --olive: #a9bd82; --olive-fond: #262d1c;
  --rouge: #e08b85; --rouge-fond: #3a2120;
  --bleu: #8fb6d2; --bleu-fond: #1e2a33;
  --ombre: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -14px rgba(0,0,0,.7);
  --ombre-levee: 0 2px 8px rgba(0,0,0,.5), 0 20px 44px -18px rgba(0,0,0,.85);
}

* { box-sizing: border-box; }

/* L'attribut « hidden » du HTML ne pose qu'un display:none dans la feuille du
   navigateur : la moindre regle a nous qui donne un display a l'element
   l'emporte, et « hidden » ne cache alors plus rien. Comme .porte est en
   display:grid et .panneau en display:flex, la page de mot de passe et le
   panneau restaient affiches en permanence. Cette ligne remet l'attribut au
   dessus de tout, une fois pour toutes. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 17px;          /* plus grand que d'usage : c'est délibéré */
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; margin: 0; }
a { color: var(--ocre); }

/* ==========================================================================
   Boutons — gros, nommés, jamais un pictogramme seul sans étiquette
   ========================================================================== */

.bouton {
  font: inherit; font-size: .95rem; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--trait-fort); background: var(--carte); color: var(--encre);
  padding: .55rem 1.05rem; border-radius: 999px;
  transition: background .15s, border-color .15s, transform .08s;
}
.bouton:hover { background: var(--papier-creux); border-color: var(--encre-tenue); }
.bouton:active { transform: translateY(1px); }
.bouton:focus-visible { outline: 3px solid var(--ocre); outline-offset: 2px; }
.bouton[disabled] { opacity: .45; cursor: default; }

.bouton--fort { background: var(--encre); border-color: var(--encre); color: var(--papier); font-weight: 600; }
.bouton--fort:hover { background: #000; border-color: #000; }
:root[data-theme="dark"] .bouton--fort:hover { background: #fff; }

.bouton--large { width: 100%; padding: .85rem 1.2rem; font-size: 1rem; }
.bouton--doux { background: transparent; border-color: var(--trait); color: var(--encre-douce); }
.bouton--rond { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; font-size: 1.05rem; }
.bouton--plus { display: block; margin: 2.5rem auto 0; padding: .8rem 2.2rem; }
.bouton--danger { color: var(--rouge); border-color: var(--rouge); background: transparent; }

/* ==========================================================================
   La porte
   ========================================================================== */

.porte { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.porte__boite {
  width: 100%; max-width: 400px; background: var(--carte);
  border: 1px solid var(--trait); border-radius: 20px; padding: 2.5rem 2rem;
  box-shadow: var(--ombre-levee); display: flex; flex-direction: column; gap: 1.1rem; text-align: center;
}
.porte__lampe { font-size: 2.6rem; margin: 0; line-height: 1; }
.porte h1 { font-size: 1.9rem; }
.porte__sous { margin: -.6rem 0 .4rem; color: var(--encre-tenue); font-size: .95rem; }
.porte__note { margin: 0; font-size: .85rem; color: var(--encre-tenue); }
.porte__erreur {
  margin: 0; background: var(--rouge-fond); color: var(--rouge);
  padding: .7rem .9rem; border-radius: 10px; font-size: .9rem;
}

.champ { display: flex; flex-direction: column; gap: .4rem; text-align: left; }
.champ > span, .champ > label {
  font-size: .82rem; letter-spacing: .04em; color: var(--encre-tenue); font-weight: 500;
}
.champ input, .champ select, .champ textarea {
  font: inherit; color: var(--encre); background: var(--papier);
  border: 1px solid var(--trait-fort); border-radius: 10px; padding: .7rem .85rem; width: 100%;
}
.champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: 3px solid var(--ocre); outline-offset: 1px; border-color: transparent;
}
.champ textarea { resize: vertical; min-height: 90px; line-height: 1.6; }

/* ==========================================================================
   La barre du haut
   ========================================================================== */

.barre {
  position: sticky; top: 0; z-index: 40; height: var(--hauteur-barre);
  background: color-mix(in srgb, var(--papier) 90%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--trait);
  display: flex; align-items: center; gap: 1rem; padding: 0 1.2rem;
}
.barre__gauche { display: flex; align-items: center; gap: .7rem; }
.marque { font-family: var(--serif); font-weight: 700; letter-spacing: .18em; font-size: 1rem; }
.barre__droite { margin-left: auto; display: flex; gap: .5rem; align-items: center; }

.voyant { width: 9px; height: 9px; border-radius: 50%; background: var(--olive); flex: none; }
.voyant[data-etat="attente"] { background: var(--ocre); }
.voyant[data-etat="hors-ligne"] { background: var(--encre-tenue); }

.onglets { display: flex; gap: .25rem; background: var(--papier-creux); padding: .25rem; border-radius: 999px; }
.onglet {
  font: inherit; font-size: .95rem; cursor: pointer; border: none; background: transparent;
  color: var(--encre-douce); padding: .45rem 1.1rem; border-radius: 999px;
  display: flex; align-items: center; gap: .45rem; transition: background .15s, color .15s;
}
.onglet:hover { color: var(--encre); }
.onglet.est-actif { background: var(--carte); color: var(--encre); font-weight: 600; box-shadow: var(--ombre); }
.onglet__pastille {
  min-width: 20px; height: 20px; padding: 0 .35rem; border-radius: 999px;
  background: var(--ocre); color: #fff; font-size: .72rem; font-weight: 700;
  display: grid; place-items: center; font-family: var(--sans);
}
:root[data-theme="dark"] .onglet__pastille { color: #1d1508; }

.bouton--panneau { font-size: .9rem; padding: .45rem .9rem; }
.bouton--panneau.est-ouvert { background: var(--encre); border-color: var(--encre); color: var(--papier); }

/* ==========================================================================
   La scène : la colonne principale, et le panneau à droite
   ========================================================================== */

.scene { display: grid; grid-template-columns: 1fr; }
.scene.a-panneau { grid-template-columns: minmax(0, 1fr) minmax(380px, 460px); }
.colonne { min-width: 0; }

.ecran { display: none; max-width: 1180px; margin: 0 auto; padding: 2.5rem 1.5rem 6rem; }
.ecran.est-visible { display: block; }
.ecran__tete { margin-bottom: 2rem; }
.ecran__tete h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.ecran__aide { margin: .5rem 0 0; color: var(--encre-douce); max-width: 60ch; }

/* ==========================================================================
   Écran « Aujourd'hui »
   ========================================================================== */

/* Le bandeau de saison : la première chose qu'il lit, et parfois la seule
   qui compte. */
.saison {
  background: var(--olive-fond); border-left: 4px solid var(--olive);
  border-radius: 12px; padding: 1.15rem 1.35rem; margin-bottom: 1.8rem;
}
.saison--contre { background: var(--ocre-fond); border-left-color: var(--ocre); }
.saison--proscrite { background: var(--rouge-fond); border-left-color: var(--rouge); }
.saison__titre { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; margin-bottom: .35rem; }
.saison__phrase { margin: 0 0 .55rem; color: var(--encre-douce); font-size: .95rem; }
.saison__conseil { margin: 0; font-size: .95rem; font-weight: 500; }

.chargement {
  min-height: 70vh; display: grid; place-items: center; gap: .8rem;
  color: var(--encre-tenue); text-align: center;
}
.chargement span { font-size: 2.2rem; }

.bloc-jour { margin-bottom: 2.5rem; }
.bloc-jour__titre {
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--encre-tenue); font-weight: 600; font-family: var(--sans);
  margin-bottom: .9rem; display: flex; align-items: center; gap: .6rem;
}
.bloc-jour__titre::after { content: ''; flex: 1; height: 1px; background: var(--trait); }

.tache {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--carte); border: 1px solid var(--trait); border-left: 4px solid var(--trait-fort);
  border-radius: 12px; padding: 1.1rem 1.2rem; margin-bottom: .7rem; box-shadow: var(--ombre);
}
.tache--ocre  { border-left-color: var(--ocre); }
.tache--olive { border-left-color: var(--olive); }
.tache--rouge { border-left-color: var(--rouge); }
.tache--gris  { border-left-color: var(--trait-fort); }

.tache__corps { flex: 1; min-width: 0; }
.tache__nom { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.tache__nom button {
  font: inherit; background: none; border: none; padding: 0; cursor: pointer; color: inherit;
  text-align: left; text-decoration: underline; text-decoration-color: var(--trait-fort);
  text-underline-offset: 3px;
}
.tache__nom button:hover { text-decoration-color: var(--ocre); }
.tache__lieu { font-size: .85rem; color: var(--encre-tenue); margin-bottom: .45rem; }
.tache__quoi { font-weight: 600; color: var(--ocre); margin-bottom: .2rem; }
.tache--olive .tache__quoi { color: var(--olive); }
.tache--rouge .tache__quoi { color: var(--rouge); }
.tache--gris .tache__quoi  { color: var(--encre-douce); }
.tache__pourquoi { color: var(--encre-douce); font-size: .93rem; }
.tache__garde {
  margin-top: .6rem; background: var(--rouge-fond); color: var(--rouge);
  padding: .5rem .75rem; border-radius: 8px; font-size: .85rem;
}
.tache__gestes { display: flex; flex-direction: column; gap: .45rem; flex: none; }
.tache__gestes .bouton { font-size: .88rem; padding: .5rem .9rem; }

.repos {
  text-align: center; padding: 4rem 1rem; color: var(--encre-douce);
  background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon);
}
.repos__grand { font-size: 2.6rem; display: block; margin-bottom: .8rem; }
.repos h2 { font-size: 1.4rem; margin-bottom: .5rem; }

.resume { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.resume__case {
  background: var(--carte); border: 1px solid var(--trait); border-radius: 12px;
  padding: .8rem 1.1rem; min-width: 120px; cursor: pointer; text-align: left;
  font: inherit; color: inherit;
}
.resume__case:hover { border-color: var(--trait-fort); }
.resume__nombre { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1; display: block; }
.resume__mot { font-size: .82rem; color: var(--encre-tenue); }

/* ==========================================================================
   Filtres et grille des adresses
   ========================================================================== */

.filtres {
  display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: flex-end;
  padding: 1.2rem 0 1.4rem; border-bottom: 1px solid var(--trait); margin-bottom: 1.4rem;
}
.groupe-filtre { display: flex; flex-direction: column; gap: .4rem; }
.groupe-filtre__titre { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--encre-tenue); font-weight: 600; }
.pastilles { display: flex; gap: .35rem; flex-wrap: wrap; }
.pastille {
  font: inherit; font-size: .88rem; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--trait-fort); background: transparent; color: var(--encre-douce);
  padding: .38rem .85rem; border-radius: 999px; transition: background .15s, color .15s;
}
.pastille:hover { color: var(--encre); border-color: var(--encre-tenue); }
.pastille.est-active { background: var(--encre); border-color: var(--encre); color: var(--papier); font-weight: 500; }

.champ-recherche { flex: 1 1 240px; min-width: 200px; }
.champ-recherche input {
  width: 100%; font: inherit; color: var(--encre); background: var(--carte);
  border: 1px solid var(--trait-fort); border-radius: 999px; padding: .6rem 1.1rem;
}
.champ-recherche input:focus { outline: 3px solid var(--ocre); outline-offset: 1px; border-color: transparent; }

select {
  font: inherit; font-size: .9rem; color: var(--encre); background: var(--carte);
  border: 1px solid var(--trait-fort); border-radius: 10px; padding: .45rem 2rem .45rem .75rem;
  max-width: 15rem; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 53%, calc(100% - 10px) 53%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}

.compte { color: var(--encre-tenue); font-size: .88rem; margin: 0 0 1.2rem; }
.grille { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.vide { text-align: center; color: var(--encre-tenue); padding: 4rem 0; }

.carte {
  display: flex; flex-direction: column; overflow: hidden; text-align: left;
  background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon);
  box-shadow: var(--ombre); cursor: pointer; font: inherit; color: inherit; padding: 0;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.carte:hover { transform: translateY(-3px); box-shadow: var(--ombre-levee); border-color: var(--trait-fort); }
.carte:focus-visible { outline: 3px solid var(--ocre); outline-offset: 2px; }

.carte__image { position: relative; aspect-ratio: 16 / 10; background: var(--papier-creux); overflow: hidden; }
.carte__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carte__repli {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); font-size: 3.2rem; color: rgba(255,255,255,.92);
  text-shadow: 0 2px 12px rgba(0,0,0,.28);
}
.carte__coin {
  position: absolute; top: .65rem; left: .65rem; font-size: .72rem; font-weight: 600;
  background: rgba(20,18,14,.74); color: #fff; backdrop-filter: blur(6px);
  padding: .25rem .6rem; border-radius: 999px;
}
.carte__corps { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.carte__genre { font-size: .7rem; letter-spacing: .11em; text-transform: uppercase; font-weight: 600; color: var(--ocre); }
.carte__nom { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; line-height: 1.25; }
.carte__lieu { font-size: .84rem; color: var(--encre-tenue); }
.carte__desc {
  margin: 0; font-size: .88rem; color: var(--encre-douce); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.carte__etape {
  margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--trait);
  font-size: .87rem; display: flex; align-items: center; gap: .45rem; font-weight: 600;
}
.carte__etape[data-couleur="ocre"]  { color: var(--ocre); }
.carte__etape[data-couleur="olive"] { color: var(--olive); }
.carte__etape[data-couleur="rouge"] { color: var(--rouge); }
.carte__etape[data-couleur="gris"]  { color: var(--encre-tenue); font-weight: 500; }

.puce { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

/* ==========================================================================
   La fiche d'une adresse
   ========================================================================== */

.fiche {
  border: none; padding: 0; max-width: 760px; width: calc(100% - 2rem);
  background: var(--carte); color: var(--encre); border-radius: 18px;
  box-shadow: var(--ombre-levee); max-height: 90vh; overflow: auto;
}
.fiche::backdrop { background: rgba(20,18,14,.58); backdrop-filter: blur(3px); }
.fiche__fermer {
  position: sticky; float: right; top: .8rem; right: .8rem; z-index: 3; margin: .8rem .8rem -3rem 0;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1rem;
  border: 1px solid var(--trait-fort); background: var(--carte); color: var(--encre);
}
.fiche__image { aspect-ratio: 21 / 9; background: var(--papier-creux); position: relative; overflow: hidden; }
.fiche__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fiche__interieur { padding: 1.6rem 1.9rem 2.2rem; }
.fiche h2 { font-size: 1.8rem; line-height: 1.15; margin: .3rem 0 .25rem; }
.fiche__sous { color: var(--encre-tenue); font-size: .92rem; margin: 0 0 1.3rem; }
.fiche__desc { color: var(--encre-douce); margin: 0 0 1.6rem; }

.encadre-etape {
  background: var(--ocre-fond); border-radius: 12px; padding: 1.1rem 1.2rem; margin-bottom: 1.6rem;
}
.encadre-etape[data-couleur="olive"] { background: var(--olive-fond); }
.encadre-etape[data-couleur="rouge"] { background: var(--rouge-fond); }
.encadre-etape[data-couleur="gris"]  { background: var(--papier-creux); }
.encadre-etape__quoi { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; margin-bottom: .25rem; }
.encadre-etape__pourquoi { font-size: .93rem; color: var(--encre-douce); }
.encadre-etape .bouton { margin-top: .9rem; }

.rangee-gestes { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.8rem; }

.titre-bloc {
  font-size: .74rem; letter-spacing: .11em; text-transform: uppercase; color: var(--encre-tenue);
  font-weight: 600; font-family: var(--sans); margin: 1.8rem 0 .8rem;
}

.tableau { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tableau th {
  text-align: left; font-weight: 500; color: var(--encre-tenue); font-size: .76rem;
  letter-spacing: .07em; text-transform: uppercase; padding: .65rem 1rem .65rem 0;
  vertical-align: top; width: 9rem; white-space: nowrap;
}
.tableau td { padding: .65rem 0; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau tr:last-child td, .tableau tr:last-child th { border-bottom: none; }
.absent { color: var(--encre-tenue); font-style: italic; }

.frise { list-style: none; margin: 0; padding: 0; }
.frise li {
  display: flex; gap: .85rem; padding: .75rem 0; border-bottom: 1px solid var(--trait);
  align-items: flex-start;
}
.frise li:last-child { border-bottom: none; }
.frise__jour { font-size: .8rem; color: var(--encre-tenue); width: 6.5rem; flex: none; padding-top: .15rem; }
.frise__quoi { flex: 1; min-width: 0; }
.frise__type { font-weight: 600; }
.frise__issue { font-size: .87rem; color: var(--encre-douce); }
.frise__note { font-size: .87rem; color: var(--encre-douce); font-style: italic; margin-top: .2rem; }
.frise .bouton { font-size: .8rem; padding: .3rem .7rem; }

.etiquette {
  font-size: .74rem; padding: .22rem .55rem; border-radius: 6px; font-weight: 600;
  background: var(--olive-fond); color: var(--olive);
}
.etiquette--guide { background: var(--ocre-fond); color: var(--ocre); }
.etiquette--rouge { background: var(--rouge-fond); color: var(--rouge); }
.etiquette--bleu  { background: var(--bleu-fond); color: var(--bleu); }
.liste-infos { margin: 0; padding-left: 1.15rem; color: var(--encre-douce); font-size: .92rem; }
.liste-infos li { margin-bottom: .3rem; }

/* ==========================================================================
   Le panneau de droite : le discours et le carnet
   ========================================================================== */

.panneau {
  border-left: 1px solid var(--trait); background: var(--papier-creux);
  display: flex; flex-direction: column; position: sticky; top: var(--hauteur-barre);
  height: calc(100vh - var(--hauteur-barre)); min-width: 0;
}
.panneau__tete {
  display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem;
  border-bottom: 1px solid var(--trait); background: var(--papier);
}
.panneau__onglets { display: flex; gap: .3rem; flex: 1; }
.panneau__onglet {
  font: inherit; font-size: .92rem; cursor: pointer; border: 1px solid transparent;
  background: transparent; color: var(--encre-douce); padding: .4rem .85rem; border-radius: 999px;
}
.panneau__onglet.est-actif { background: var(--carte); border-color: var(--trait); color: var(--encre); font-weight: 600; }
.panneau__corps { flex: 1; overflow: auto; padding: 1.3rem; }

.section-discours {
  background: var(--carte); border: 1px solid var(--trait); border-radius: 12px;
  margin-bottom: .8rem; overflow: hidden;
}
.section-discours__tete {
  width: 100%; font: inherit; text-align: left; cursor: pointer; background: transparent;
  border: none; color: inherit; padding: .9rem 1rem; display: flex; align-items: center; gap: .6rem;
}
.section-discours__tete:hover { background: var(--papier-creux); }
.section-discours__titre { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; flex: 1; }
.section-discours__fleche { color: var(--encre-tenue); transition: transform .18s; }
.section-discours.est-ouverte .section-discours__fleche { transform: rotate(90deg); }
.section-discours__corps { display: none; padding: 0 1rem 1rem; }
.section-discours.est-ouverte .section-discours__corps { display: block; }
.section-discours__aide { font-size: .85rem; color: var(--encre-tenue); margin: 0 0 .7rem; }
.section-discours textarea {
  width: 100%; font: inherit; font-size: .95rem; line-height: 1.65; color: var(--encre);
  background: var(--papier); border: 1px solid var(--trait); border-radius: 10px;
  padding: .8rem .9rem; resize: vertical; min-height: 150px;
}
.section-discours textarea:focus { outline: 3px solid var(--ocre); outline-offset: 1px; border-color: transparent; }
.section-discours__pied { display: flex; gap: .5rem; align-items: center; margin-top: .6rem; flex-wrap: wrap; }
.section-discours__pied .bouton { font-size: .85rem; padding: .4rem .8rem; }
.enregistre { font-size: .8rem; color: var(--olive); margin-left: auto; }

.note {
  background: var(--carte); border: 1px solid var(--trait); border-radius: 12px;
  padding: .9rem 1rem; margin-bottom: .7rem;
}
.note__tete { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .35rem; }
.note__jour { font-size: .78rem; color: var(--encre-tenue); }
.note__adresse { font-size: .78rem; color: var(--ocre); font-weight: 600; }
.note__texte { white-space: pre-wrap; font-size: .93rem; line-height: 1.6; }
.note__pied { display: flex; gap: .4rem; margin-top: .5rem; }
.note__pied .bouton { font-size: .78rem; padding: .25rem .65rem; }

/* ==========================================================================
   L'agenda
   ========================================================================== */

.mois { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.mois h2 { font-size: 1.5rem; flex: 1; text-transform: capitalize; }

.calendrier { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--trait); border: 1px solid var(--trait); border-radius: 12px; overflow: hidden; }
.calendrier__entete {
  background: var(--papier-creux); padding: .55rem .4rem; text-align: center;
  font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--encre-tenue); font-weight: 600;
}
.jour {
  background: var(--carte); min-height: 96px; padding: .45rem; border: none; text-align: left;
  font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: .25rem;
}
.jour:hover { background: var(--papier-creux); }
.jour--hors { background: var(--papier); color: var(--encre-tenue); }
.jour--aujourdhui { box-shadow: inset 0 0 0 2px var(--ocre); }
.jour__nombre { font-size: .85rem; font-weight: 600; }
.jour__rdv {
  background: var(--olive-fond); color: var(--olive); border-radius: 6px;
  padding: .18rem .35rem; font-size: .74rem; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.jour__rdv--fait { background: var(--papier-creux); color: var(--encre-tenue); text-decoration: line-through; }
.jour__tache { font-size: .72rem; color: var(--ocre); }

.liste-rdv { margin-top: 2rem; }
.rdv-ligne {
  display: flex; gap: 1rem; align-items: flex-start; background: var(--carte);
  border: 1px solid var(--trait); border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: .6rem;
}
.rdv-ligne__quand { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; width: 9rem; flex: none; }
.rdv-ligne__quoi { flex: 1; min-width: 0; }
.rdv-ligne__lieu { font-size: .86rem; color: var(--encre-tenue); }
.rdv-ligne .bouton { font-size: .82rem; padding: .35rem .75rem; }

/* ==========================================================================
   Boîte de dialogue, bandeau d'annulation, barre du bas
   ========================================================================== */

.boite {
  border: none; padding: 0; max-width: 480px; width: calc(100% - 2rem);
  background: var(--carte); color: var(--encre); border-radius: 18px; box-shadow: var(--ombre-levee);
}
.boite::backdrop { background: rgba(20,18,14,.58); backdrop-filter: blur(3px); }
.boite__interieur { padding: 1.6rem 1.7rem 1.7rem; display: flex; flex-direction: column; gap: 1rem; }
.boite h2 { font-size: 1.4rem; }
.boite__aide { margin: -.5rem 0 0; color: var(--encre-douce); font-size: .92rem; }
.boite__pied { display: flex; gap: .6rem; margin-top: .4rem; }
.boite__pied .bouton { flex: 1; justify-content: center; }

.choix { display: flex; flex-direction: column; gap: .45rem; }
.choix__option {
  font: inherit; text-align: left; cursor: pointer; background: var(--papier);
  border: 1px solid var(--trait-fort); border-radius: 10px; padding: .75rem .9rem; color: inherit;
}
.choix__option:hover { border-color: var(--ocre); background: var(--ocre-fond); }
.choix__option.est-choisi { border-color: var(--encre); background: var(--papier-creux); font-weight: 600; }

.pastille-info {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 90;
  background: var(--encre); color: var(--papier); border-radius: 999px;
  padding: .7rem 1.2rem; display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--ombre-levee); font-size: .92rem;
}
.pastille-info button {
  font: inherit; font-weight: 600; background: none; border: none; cursor: pointer;
  color: var(--ocre); padding: 0;
}

.barre-basse { display: none; }

/* ==========================================================================
   Téléphone et tablette
   ========================================================================== */

@media (max-width: 1000px) {
  .scene.a-panneau { grid-template-columns: 1fr; }
  .panneau {
    position: fixed; inset: 0; z-index: 60; height: 100vh; border-left: none;
    background: var(--papier);
  }
}

@media (max-width: 780px) {
  body { font-size: 16px; }
  .barre { padding: 0 .8rem; }
  .onglets, .bouton--panneau { display: none; }
  .barre__droite { gap: .35rem; }
  .ecran { padding: 1.5rem 1rem 6.5rem; }
  .tache { flex-direction: column; gap: .8rem; }
  .tache__gestes { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .tache__gestes .bouton { flex: 1; text-align: center; }
  .grille { grid-template-columns: 1fr; }
  .fiche__interieur { padding: 1.2rem 1.1rem 1.8rem; }
  .tableau th { width: auto; display: block; padding-bottom: .1rem; }
  .tableau td { display: block; padding-top: .1rem; }
  .jour { min-height: 62px; }
  .jour__rdv { font-size: .66rem; }
  .rdv-ligne { flex-direction: column; gap: .4rem; }
  .rdv-ligne__quand { width: auto; }

  .barre-basse {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed;
    bottom: 0; left: 0; right: 0; z-index: 50; background: var(--carte);
    border-top: 1px solid var(--trait); padding-bottom: env(safe-area-inset-bottom);
  }
  .onglet-bas {
    font: inherit; font-size: .68rem; cursor: pointer; border: none; background: none;
    color: var(--encre-tenue); padding: .5rem .2rem .55rem; display: flex;
    flex-direction: column; align-items: center; gap: .15rem;
  }
  .onglet-bas span { font-size: 1.15rem; line-height: 1; }
  .onglet-bas.est-actif { color: var(--ocre); font-weight: 600; }
}

@media print {
  .barre, .barre-basse, .filtres, .panneau, .bouton, .pastille-info { display: none !important; }
  body { background: #fff; color: #000; font-size: 10pt; }
  .grille { display: block; }
  .carte { break-inside: avoid; box-shadow: none; border: none; border-bottom: 1px solid #ccc; border-radius: 0; }
  .carte__image { display: none; }
}
