/* IRRINEO — habillage visuel (validé par Antoine le 05/11/2026).
   Chargé en dernier sur les pages de l'appli : il ne change que l'apparence
   (couleurs, police, arrondis, ombres, symboles des boutons), jamais la disposition ni les fonctions.
   Pour revenir à l'ancien aspect, il suffit de retirer la ligne <link ... habillage.css> des pages.

   Sommaire :
   1. Couleurs de base et police du système (clair et sombre)
   2. Barre du haut, cartes, Mon exploitation (liste façon Réglages), fenêtres
   3. Formes en capsules sur Aujourd'hui ; carte « En cours » en sombre
   4. Code des boutons : vert + triangle = démarrer, bleu + coche = finir, ardoise + carré = arrêt imprévu */

/* ===== 1 et 2. Base ===== */
:root {
  --fond: #f2f2f7;
  --surface: #ffffff;
  --texte: #1c1c1e;
  --texte-2: #6c6c70;
  --ligne-nette: #e1e1e6;
  --accent: #0b6e99;
  --accent-survol: #095b7f;
  --bouton: #0b6e99;
  --bouton-survol: #095b7f;
  --focus: #0b6e99;
  --line: #e1e1e6;
  --survol-fond: rgba(11, 110, 153, .07);
  --ir-eau: #0b6e99;
  --ir-eau-clair: #e3f0f6;
  --ir-fond: var(--fond);
  --irn-eau: #1c9bd1;
  --irn-sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Inter, sans-serif;
}
html[data-theme="sombre"] {
  --fond: #000000;
  --surface: #1c1c1e;
  --texte: #f2f2f7;
  --texte-2: #98989f;
  --ligne-nette: #38383a;
  --accent: #5ac3ea;
  --accent-survol: #7fd0ee;
  --bouton: #0b6e99;
  --line: #38383a;
  --rail: #1c1c1e;
  --pastille: #2c2c2e;
  --s-carte: #1c1c1e;
  --s-carte-2: #2c2c2e;
  --s-texte: #f2f2f7;
  --s-texte-2: #98989f;
  --s-ligne: #38383a;
  --irn-eau: #5ac3ea;
}

/* Police du système : celle de l'iPhone et du Mac, Segoe sur Windows, Roboto sur Android. */
body, body *:not(svg):not(path) { font-family: var(--irn-sys) !important; }
body { letter-spacing: 0 !important; -webkit-font-smoothing: antialiased; background: var(--fond) !important; }
h1, h2, h3 { letter-spacing: -.015em !important; }
.ferme-entete h1 { font-weight: 700; }

/* Barre du haut : verre dépoli, onglet choisi teinté (comme une barre d'onglets iOS). */
#barre-app { background: color-mix(in srgb, var(--fond) 82%, transparent) !important; -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--ligne-nette) !important; }
#barre-app .barre-app-marque { font-weight: 700; letter-spacing: .03em; }
#barre-app .barre-app-onglet { border-bottom-color: transparent !important; font-weight: 500; }
#barre-app .barre-app-onglet[aria-current] { color: var(--accent) !important; font-weight: 600; }
#barre-app .barre-app-icone[aria-current] { color: var(--accent) !important; }
.barre-app-icone[aria-current]::after { display: none; }

/* Cartes : arrondi iOS, pas d'ombre, fond blanc sur gris. */
.aj-ligne, .aj-liste, .aj-vide, .ferme-groupe, #contenu .cr-eau, #contenu .cr-parcelles, #contenu .tour-liste { border-radius: 14px !important; box-shadow: none !important; border: 0 !important; }
.aj-meteo { border-radius: 999px !important; box-shadow: none !important; }
.aj-meteo svg { color: #ff9f0a !important; }

/* En cours : bleu IRRINEO, léger dégradé comme les widgets iOS. */
.aj-encours, html[data-theme="sombre"] .aj-encours { border-radius: 22px !important; background: linear-gradient(160deg, #1189bd 0%, #0b6e99 55%, #095b7f 100%) !important; }
.aj-encours h3 { font-weight: 700 !important; }
.aj-etiquette { letter-spacing: .04em; }
#contenu .aj-bouton-clair { border-radius: 999px !important; color: #0b6e99 !important; font-weight: 600 !important; }

/* Boutons d'action : pilule bleue, plus d'orange. */
#contenu .aj-lancer { border-radius: 999px !important; background: var(--bouton) !important; font-weight: 600 !important; }
#contenu .aj-autre-passage { border-radius: 999px !important; border: 0 !important; background: color-mix(in srgb, var(--accent) 12%, transparent) !important; color: var(--accent) !important; }
#contenu .aj-lien { color: var(--accent) !important; font-weight: 600 !important; }
.aj-surbrillance { box-shadow: 0 0 0 3px var(--accent) !important; }
.aj-jauge { border-radius: 999px !important; background: rgba(118,118,128,.16) !important; }
.aj-jauge span { background: var(--irn-eau) !important; border-radius: 999px; }
#contenu .cr-export > summary { border-radius: 14px !important; background: var(--bouton) !important; }

/* Mon exploitation : vignettes pleines comme les Réglages de l'iPhone, pictogramme blanc. */
.ferme-pictogramme { width: 32px !important; height: 32px !important; border-radius: 8px !important; color: #fff !important; background: var(--teinte) !important; }
.ferme-pictogramme[data-teinte="vert"] { --teinte: #34a853; }
.ferme-pictogramme[data-teinte="bleu"] { --teinte: #2f80ed; }
.ferme-pictogramme[data-teinte="eau"] { --teinte: #1189bd; }
.ferme-pictogramme[data-teinte="orange"] { --teinte: #ff9500; }
.ferme-pictogramme[data-teinte="gris"] { --teinte: #8e8e93; }
html[data-theme="sombre"] .ferme-pictogramme[data-teinte="vert"] { --teinte: #30a14e; }
html[data-theme="sombre"] .ferme-pictogramme[data-teinte="bleu"] { --teinte: #2f80ed; }
html[data-theme="sombre"] .ferme-pictogramme[data-teinte="eau"] { --teinte: #1189bd; }
html[data-theme="sombre"] .ferme-pictogramme[data-teinte="orange"] { --teinte: #f08c00; }
html[data-theme="sombre"] .ferme-pictogramme[data-teinte="gris"] { --teinte: #636366; }
#contenu .ferme-ligne .ferme-pictogramme svg { width: 19px !important; height: 19px !important; }
#contenu .ferme-ligne { min-height: 52px !important; }
#contenu .ferme-ligne + .ferme-ligne { border-top: .5px solid var(--ligne-nette) !important; }
.ferme-ligne svg { color: #c4c4c7; }

/* Fenêtres qui montent : coins iOS, boutons bleus. */
.fenetre { border-radius: 14px 14px 0 0 !important; }
html[data-theme="sombre"] .fenetre { background: #1c1c1e !important; }
@media (min-width: 760px) { .fenetre { border-radius: 16px !important; } }
#fenetre-fond .fenetre .fenetre-principal, #fenetre-fond .fenetre .fenetre-secondaire { border-radius: 14px !important; background: var(--bouton) !important; font-weight: 600 !important; }
#fenetre-fond .fenetre .fenetre-sombre { background: #1c1c1e !important; }
#fenetre-fond .fenetre-reglages summary, #fenetre-fond .fenetre .fenetre-lien { color: var(--accent) !important; }
#fenetre-fond .fiche-reserve, #fenetre-fond .fiche-liens { background: var(--fond) !important; border-radius: 14px !important; }
.fenetre-resume { border-radius: 14px !important; }

/* ===== 3. Formes en capsules ===== */
.aj-liste { background: transparent !important; overflow: visible !important; display: flex; flex-direction: column; gap: 8px; }
#contenu .aj-autre { background: var(--surface) !important; border-radius: 999px !important; border-top: 0 !important; padding-left: 20px !important; }
html[data-theme="sombre"] #contenu .aj-autre { background: #1c1c1e !important; }
#contenu .aj-autre + .aj-autre { border-top: 0 !important; }
.aj-ligne { border-radius: 40px !important; padding-left: 22px !important; }
.aj-encours, html[data-theme="sombre"] .aj-encours { border-radius: 40px !important; padding: 24px !important; }
#contenu .cr-eau, #contenu .cr-parcelles, #contenu .tour-liste { border-radius: 32px !important; }
.fenetre { border-radius: 36px 36px 0 0 !important; }
#fenetre-fond .fiche-reserve, #fenetre-fond .fiche-liens, .fenetre-resume { border-radius: 28px !important; }

/* En cours en sombre : carte sombre, le bleu seulement sur l'étiquette, la barre et le bouton. */
html[data-theme="sombre"] .aj-encours { background: #1c1c1e !important; border: 1px solid rgba(90,195,234,.28) !important; }
html[data-theme="sombre"] .aj-encours .aj-etiquette { color: #5ac3ea !important; opacity: 1; }
html[data-theme="sombre"] .aj-encours .aj-progression { background: rgba(255,255,255,.12) !important; } html[data-theme="sombre"] .aj-encours .aj-progression span { background: #5ac3ea !important; }
html[data-theme="sombre"] #contenu .aj-encours .aj-bouton-clair { background: #1189bd !important; color: #fff !important; box-shadow: none; }

/* ===== 4. Code des boutons ===== */
/* Palette Eau et prairie, version claire pour le cerveau :
   vert + triangle = démarrer ; bleu + coche = finir ; ardoise + carré = arrêter. */
:root { --go: #179c76; --go-2: #12845f; --fin: #0b6e99; --fin-2: #095d82; --stop: #4f6478; --stop-bg: #e8edf2;
  --ico-play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 2.8v10.4c0 .6.7 1 1.2.6l8-5.2a.7.7 0 0 0 0-1.2l-8-5.2c-.5-.4-1.2 0-1.2.6z'/%3E%3C/svg%3E");
  --ico-ok: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8'/%3E%3C/svg%3E");
  --ico-stop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='3.5' y='3.5' width='9' height='9' rx='2'/%3E%3C/svg%3E"); }
html[data-theme="sombre"] { --go: #22b88c; --go-2: #1aa07a; --fin: #1d8fc4; --fin-2: #1680b2; --stop: #a9b8c8; --stop-bg: #26303b; }

/* Symbole avant le texte */
#contenu .aj-lancer, #contenu .aj-bouton-clair, #contenu .aj-autre-passage, #fenetre-fond .fenetre .fenetre-principal, #fenetre-fond .fenetre .fenetre-secondaire { display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; }
#contenu .aj-lancer::before, #contenu .aj-autre-passage::before, #fenetre-fond .fenetre .fenetre-principal:not(.fenetre-sombre)::before,
#contenu .aj-bouton-clair::before, #fenetre-fond .fenetre .fenetre-principal.fenetre-sombre::before,
#fenetre-fond .fenetre .fenetre-secondaire::before { content: ""; width: 14px; height: 14px; flex: none; background: currentColor; -webkit-mask: var(--ico-play) center / contain no-repeat; mask: var(--ico-play) center / contain no-repeat; }
#contenu .aj-bouton-clair::before, #fenetre-fond .fenetre .fenetre-principal.fenetre-sombre::before { -webkit-mask-image: var(--ico-ok); mask-image: var(--ico-ok); width: 16px; height: 16px; }
#fenetre-fond .fenetre .fenetre-secondaire::before { -webkit-mask-image: var(--ico-stop); mask-image: var(--ico-stop); width: 13px; height: 13px; }

/* Démarrer : vert */
#contenu .aj-lancer, #fenetre-fond .fenetre .fenetre-principal { background: linear-gradient(180deg, var(--go) 0%, var(--go-2) 100%) !important; color: #fff !important; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 14px color-mix(in srgb, var(--go) 28%, transparent) !important; }
#contenu .aj-autre-passage { background: color-mix(in srgb, var(--go) 12%, transparent) !important; color: var(--go-2) !important; border: 0 !important; }
html[data-theme="sombre"] #contenu .aj-autre-passage { color: var(--go) !important; }

/* Finir : bleu */
#contenu .aj-bouton-clair { background: #ffffff !important; color: var(--fin) !important; box-shadow: 0 4px 12px rgba(0,0,0,.14) !important; }
html[data-theme="sombre"] #contenu .aj-encours .aj-bouton-clair { background: linear-gradient(180deg, var(--fin) 0%, var(--fin-2) 100%) !important; color: #fff !important; }
#fenetre-fond .fenetre .fenetre-principal.fenetre-sombre { background: linear-gradient(180deg, var(--fin) 0%, var(--fin-2) 100%) !important; color: #fff !important; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 14px color-mix(in srgb, var(--fin) 28%, transparent) !important; }

/* Arrêter : ardoise */
#fenetre-fond .fenetre .fenetre-secondaire, html[data-theme="sombre"] #fenetre-fond .fenetre .fenetre-secondaire { background: var(--stop-bg) !important; color: var(--stop) !important; border: 0 !important; box-shadow: none !important; }

/* ===== 5. Interrupteurs et suppression ===== */
/* Interrupteur : gris clair éteint, vert allumé (même vert que « démarrer »). */
:root { --interrupteur-off: #e3e3e8; --interrupteur-on: #179c76; --supprimer: #d63a2f; --supprimer-bg: rgba(214, 58, 47, .1);
  --ico-poubelle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5h11M6.5 4.5V3a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1.5M4 4.5l.7 8.6a1 1 0 0 0 1 .9h4.6a1 1 0 0 0 1-.9l.7-8.6'/%3E%3C/svg%3E"); }
:root[data-theme="sombre"] { --interrupteur-off: #39393d; --interrupteur-on: #22b88c; --supprimer: #ff6b61; --supprimer-bg: rgba(255, 107, 97, .14); }
body input[type="checkbox"].interrupteur { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04); }
body input[type="checkbox"].interrupteur::before { box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16) !important; }

/* Supprimer : rouge, avec une poubelle, en capsule teintée (jamais en bouton plein : l'action ne doit pas attirer l'œil). */
body .danger, .fiche-supprimer, #fenetre-fond .fenetre .fenetre-danger, #contenu .lot-editeur .lien-danger, .carte-editor-side .passage-supprimer {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px !important; padding: 0 18px !important; border: 0 !important; border-radius: 999px !important;
  background: var(--supprimer-bg) !important; color: var(--supprimer) !important; font-weight: 600 !important; text-decoration: none !important; box-shadow: none !important; }
body .danger::before, .fiche-supprimer::before, #fenetre-fond .fenetre .fenetre-danger::before, #contenu .lot-editeur .lien-danger::before, .carte-editor-side .passage-supprimer::before {
  content: ""; width: 15px; height: 15px; flex: none; background: currentColor; -webkit-mask: var(--ico-poubelle) center / contain no-repeat; mask: var(--ico-poubelle) center / contain no-repeat; }
#fenetre-fond .fenetre .fenetre-danger { width: 100% !important; }

/* Animation des interrupteurs : la couleur se fond, le rond glisse avec un léger rebond
   et s'étire quand on appuie, comme sur l'iPhone. Aucune animation si l'appareil demande moins de mouvements. */
body input[type="checkbox"].interrupteur { transition: background-color .3s ease, box-shadow .3s ease !important; }
body input[type="checkbox"].interrupteur::before { transition: transform .38s cubic-bezier(.34, 1.36, .64, 1), width .22s ease !important; }
body input[type="checkbox"].interrupteur:active::before { width: 33px !important; }
body input[type="checkbox"].interrupteur:checked:active::before { transform: translateX(14px) !important; }
@media (prefers-reduced-motion: reduce) { body input[type="checkbox"].interrupteur, body input[type="checkbox"].interrupteur::before { transition: none !important; } }

/* ===== 6. Alignement des lignes et cases à cocher =====
   Une seule règle pour toutes les lignes de réglage : texte à gauche, contrôle à droite,
   contrôle centré verticalement sur la ligne (même quand le texte tient sur deux lignes),
   et bord droit commun aux interrupteurs et aux cases. */
body label.ligne:has(> input[type="checkbox"]:last-child) { align-items: center !important; justify-content: space-between; gap: 16px; }
body label.ligne:has(> input[type="checkbox"]:last-child) > :first-child { flex: 1 1 auto; min-width: 0; }

/* Case à cocher : rond de 24 px façon iPhone, vert « coché » assorti aux interrupteurs. */
:root { --case-bord: #c7c7cc; --ico-coche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 12.5l3.6 3.6 7.4-8'/%3E%3C/svg%3E"); }
:root[data-theme="sombre"] { --case-bord: #5a5a5f; }
body input[type="checkbox"]:not(.interrupteur), body > main input[type="checkbox"]:not(.interrupteur) {
  -webkit-appearance: none !important; appearance: none !important; flex: none;
  width: 24px !important; height: 24px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important;
  border: 1.5px solid var(--case-bord) !important; border-radius: 50% !important; background: var(--surface) center / 18px no-repeat !important;
  cursor: pointer; transition: background-color .2s ease, border-color .2s ease, transform .15s ease; }
body input[type="checkbox"]:not(.interrupteur):checked { background-color: var(--interrupteur-on) !important; background-image: var(--ico-coche) !important; border-color: var(--interrupteur-on) !important; }
body input[type="checkbox"]:not(.interrupteur):active { transform: scale(.9); }
body input[type="checkbox"]:not(.interrupteur):focus-visible { outline: 3px solid var(--interrupteur-on); outline-offset: 2px; }
body input[type="checkbox"]:not(.interrupteur):disabled { opacity: .45; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { body input[type="checkbox"]:not(.interrupteur) { transition: none !important; } }
/* Case placée avant son texte (consentement, listes) : centrée sur la première ligne du texte. */
label:has(> input[type="checkbox"]:not(.interrupteur):first-child) > input[type="checkbox"] { margin-top: calc((1lh - 24px) / 2) !important; }
/* Interrupteur éteint posé sur un fond gris : léger contour pour qu'il reste visible. */
body input[type="checkbox"].interrupteur:not(:checked) { box-shadow: inset 0 0 0 1px rgba(60, 60, 67, .1) !important; }
body label.ligne:has(> input[type="checkbox"]:last-child) > input[type="checkbox"]:last-child { align-self: center !important; margin: 0 !important; }

/* ===== 7. Planning de la semaine (emploi du temps) =====
   Bleu plein = en cours (l'eau coule), contour gris = proposé, pas encore lancé ; trait rouge = maintenant.
   Jours en capsules, colonnes gris clair façon Calendrier. */
#contenu .edt-jour { border-radius: 16px !important; border-color: transparent !important; background: var(--surface) !important; box-shadow: inset 0 0 0 1px var(--ligne-nette) !important; transition: background-color .2s ease, transform .15s ease; }
#contenu .edt-jour:active { transform: scale(.96); }
#contenu .edt-jour i { color: var(--fin) !important; }
#contenu .edt-jour[aria-pressed="true"] { background: linear-gradient(180deg, var(--fin) 0%, var(--fin-2) 100%) !important; box-shadow: 0 4px 10px color-mix(in srgb, var(--fin) 25%, transparent) !important; }
#contenu .edt-jour[aria-pressed="true"] i { color: #fff !important; }
.edt-heures-fond { border-radius: 14px; background: repeating-linear-gradient(to bottom, #f2f2f7 0, #f2f2f7 51px, #e5e5ea 51px, #e5e5ea 52px); }
html[data-theme="sombre"] .edt-heures-fond { background: repeating-linear-gradient(to bottom, #2c2c2e 0, #2c2c2e 51px, #3a3a3c 51px, #3a3a3c 52px); }
.edt-bloc { border-radius: 10px; }
.edt-encours, .edt-pause { background: linear-gradient(180deg, var(--fin) 0%, var(--fin-2) 100%); color: #fff; }
.edt-propose { background: var(--surface); color: var(--texte); border: 1.5px solid #aeaeb2; border-left-width: 4px; }
html[data-theme="sombre"] .edt-propose { border-color: #636366; }
.edt-pastille { border-radius: 50%; }
.edt-maintenant, .edt-maintenant::before { background: #e5484d; }

/* ===== 8. Éléments ajoutés par la PR #15 (sans effet avant sa fusion) ===== */
/* Bascule Semaine / Jour : sélecteur segmenté façon iPhone. */
.edt-vues { border-radius: 10px; padding: 2px; background: rgba(118, 118, 128, .12); }
#contenu .edt-vue { border-radius: 8px !important; color: var(--texte) !important; transition: background-color .2s ease; }
#contenu .edt-vue[aria-pressed="true"] { background: var(--surface) !important; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .04) !important; }
html[data-theme="sombre"] .edt-vues { background: rgba(118, 118, 128, .24); }
html[data-theme="sombre"] #contenu .edt-vue[aria-pressed="true"] { background: #636366 !important; }
/* Liens Tour d'eau / Planning sous le titre d'Aujourd'hui : capsules blanches. */
#contenu .aj-liens-haut .aj-lien { border: 0 !important; border-radius: 999px !important; background: var(--surface) !important; color: var(--fin) !important; }
html[data-theme="sombre"] #contenu .aj-liens-haut .aj-lien { color: #5ac3ea !important; }
/* Choix de plusieurs parcelles : lignes alignées comme les réglages. */
#contenu .intervention-parcelles .case-ligne { align-items: center; border-bottom-color: var(--ligne-nette); }
#contenu .intervention-parcelles .case-ligne input { margin: 0 !important; }

/* ===== 9. Boutons, puces de parcelles et pages hors écran principal (06/11) =====
   Tous les boutons d'action prennent la même forme de capsule que sur Aujourd'hui :
   bleu plein = action principale, bleu teinté = action secondaire. */
html body > main :is(.primary, .secondary, a.button, .section-actions > button, .card > button:not([class])),
html body > main button:is(.primary, .secondary), html body > main button:not([class]):not([aria-label]) { border-radius: 999px !important; padding-inline: 20px !important; font-weight: 600 !important; }
html body > main .secondary { background: rgba(11, 110, 153, .1) !important; color: var(--fin) !important; border-color: transparent !important; }
html[data-theme="sombre"] body > main .secondary { background: rgba(90, 195, 234, .14) !important; color: #5ac3ea !important; }
@media (hover: hover) { html body > main .secondary:hover { background: rgba(11, 110, 153, .16) !important; } }
html body > main .primary { background: linear-gradient(180deg, var(--fin) 0%, var(--fin-2) 100%) !important; border-color: transparent !important; color: #fff !important; }

/* Puces de parcelles (Bilan, Météo) : seule la parcelle choisie est pleine. */
.parcel-list :is(.parcel-choice, #_) { border-radius: 999px !important; border: 0 !important; background: var(--surface) !important; color: var(--texte) !important; box-shadow: inset 0 0 0 1px var(--ligne-nette) !important; font-weight: 500 !important; }
.parcel-list :is(.parcel-choice, #_)[aria-current="true"] { background: linear-gradient(180deg, var(--fin) 0%, var(--fin-2) 100%) !important; color: #fff !important; box-shadow: none !important; font-weight: 650 !important; }

/* Bandeau de confidentialité : mêmes couleurs que l'appli. */
html body .ic-privacy-panel { background: rgba(0, 0, 0, .32) !important; color: var(--texte) !important; font-family: var(--irn-sys) !important; }
html body .ic-privacy-card { background: var(--surface) !important; border: 0 !important; box-shadow: 0 -10px 40px rgba(0, 0, 0, .18) !important; }
html body .ic-privacy-kicker, html body .ic-privacy-card p a, html body .ic-privacy-secondary, html body .ic-privacy-confirm { color: var(--fin) !important; }
html body .ic-privacy-card p { color: var(--texte-2) !important; }
html body .ic-privacy-option { background: var(--fond) !important; border: 0 !important; border-radius: 14px !important; color: var(--texte) !important; }
html body .ic-privacy-actions button { border-radius: 999px !important; min-height: 44px !important; font-weight: 600 !important; }
html body .ic-privacy-primary { background: linear-gradient(180deg, var(--fin) 0%, var(--fin-2) 100%) !important; border-color: transparent !important; color: #fff !important; }
html body .ic-privacy-secondary { background: rgba(11, 110, 153, .1) !important; border-color: transparent !important; }

/* Connexion : panneau bleu IRRINEO, champs et boutons arrondis. */
body.page-connexion { --cx-accent: #0b6e99; --cx-accent-survol: #095b7f; --cx-fond: #f2f2f7; --cx-texte: #1c1c1e; --cx-texte-2: #6c6c70; --cx-ligne: #e1e1e6; --cx-panneau: #0b6e99; --cx-panneau-texte: #fff; --cx-panneau-texte-2: rgba(255, 255, 255, .82); --cx-panneau-accent: #bfe6f5; }
html[data-theme="sombre"] body.page-connexion { --cx-accent: #5ac3ea; --cx-accent-survol: #7fd0ee; --cx-fond: #000; --cx-texte: #f2f2f7; --cx-texte-2: #98989f; --cx-ligne: #38383a; --cx-panneau: #1c1c1e; --cx-panneau-accent: #5ac3ea; }
.page-connexion .cx-pitch { background: linear-gradient(160deg, #1189bd 0%, #0b6e99 55%, #095b7f 100%) !important; }
html[data-theme="sombre"] .page-connexion .cx-pitch { background: #1c1c1e !important; }
.page-connexion .cx { border-radius: 22px; box-shadow: 0 20px 50px -30px rgba(0, 0, 0, .35); }
.page-connexion input:not([type="checkbox"]) { border-radius: 12px; background: var(--surface); }
.page-connexion :is(#connexion-button, #inscription-button) { border-radius: 999px !important; background: linear-gradient(180deg, var(--fin) 0%, var(--fin-2) 100%) !important; border: 0 !important; }

/* Ferme de démonstration, installation, mot de passe oublié : fond et bleu d'IRRINEO. */
body:has(> main > .carte > .ouvrir) { --fond: #f2f2f7; --surface: #fff; --texte: #1c1c1e; --secondaire: #6c6c70; --bleu: #0b6e99; --ligne: transparent; background: var(--fond); }
.carte:has(> .ouvrir) { border-radius: 22px !important; border: 0 !important; }
.carte > .ouvrir { border-radius: 999px !important; background: linear-gradient(180deg, #179c76 0%, #12845f 100%) !important; box-shadow: 0 6px 14px rgba(23, 156, 118, .28); }
/* Titre d'écran posé sur le fond (Pivots), comme Enrouleurs. */
#contenu > h2.titre-ecran { margin: 4px 0 14px; font-size: 22px; }
/* « + Créer un lot » : même capsule teintée que les autres actions secondaires. */
#contenu .lot-creer { border: 0 !important; border-radius: 999px !important; background: rgba(11, 110, 153, .1) !important; color: var(--fin) !important; font-weight: 600 !important; }
html[data-theme="sombre"] #contenu .lot-creer { background: rgba(90, 195, 234, .14) !important; color: #5ac3ea !important; }
/* « + Ajouter une activité » (Historique) : capsule teintée. */
#contenu .activity-add > summary { display: inline-flex; align-items: center; min-height: 44px !important; padding: 0 20px !important; border: 0 !important; border-radius: 999px !important; background: rgba(11, 110, 153, .1) !important; color: var(--fin) !important; font-weight: 600 !important; }
html[data-theme="sombre"] #contenu .activity-add > summary { background: rgba(90, 195, 234, .14) !important; color: #5ac3ea !important; }
/* Petit bouton « Cookies » flottant : discret, il ne doit pas ressembler à une action. */
html body .ic-privacy-manage { background: var(--surface) !important; color: var(--texte-2) !important; border: 0 !important; border-radius: 999px !important; box-shadow: 0 1px 4px rgba(0, 0, 0, .12) !important; font-weight: 500 !important; }

/* ===== 10. Historique : « Détail » en bulles façon notifications iPhone =====
   Une bulle par activité : icône carrée arrondie (goutte = irrigation, feuille = terrain),
   parcelle en gras, date et heure en petit à droite, type puis chiffres dessous. */
:root { --ico-goutte: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5c-.3 0-.6.2-.8.4C9.6 5 5.5 10.2 5.5 14a6.5 6.5 0 0 0 13 0c0-3.8-4.1-9-5.7-11.1a1 1 0 0 0-.8-.4z'/%3E%3C/svg%3E");
  --ico-feuille: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19c0-8 5-13 14-14 0 9-5 14-13 14z'/%3E%3Cpath d='M5 19l7-7'/%3E%3C/svg%3E"); }
#contenu #historique-activites { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
#contenu #historique-activites .activity-entry { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px !important; border: 0 !important; border-radius: 22px; background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 6px 18px rgba(0, 0, 0, .06); }
html[data-theme="sombre"] #contenu #historique-activites .activity-entry { background: #2c2c2e; box-shadow: none; }
#contenu .activity-entry .activity-icone { flex: none; width: 26px; height: 26px; margin-top: 0; border-radius: 8px; background: rgba(28, 155, 209, .12); position: relative; }
#contenu .activity-entry .activity-icone::before { content: ""; position: absolute; inset: 7px; background: var(--irn-eau); -webkit-mask: var(--ico-goutte) center / contain no-repeat; mask: var(--ico-goutte) center / contain no-repeat; }
#contenu .activity-entry[data-genre="terrain"] .activity-icone { background: rgba(23, 156, 118, .12); }
#contenu .activity-entry[data-genre="terrain"] .activity-icone::before { background: var(--go); }
#contenu .activity-entry[data-genre="terrain"] .activity-icone::before { -webkit-mask-image: var(--ico-feuille); mask-image: var(--ico-feuille); }
#contenu .activity-entry .activity-corps { flex: 1 1 auto; min-width: 0; }
#contenu .activity-entry .ligne { display: flex; flex-wrap: nowrap !important; justify-content: space-between; align-items: baseline; gap: 10px; }
#contenu .activity-entry h3 { margin: 0; font-size: 15px !important; font-weight: 600 !important; letter-spacing: -.01em; color: var(--texte) !important; }
#contenu .activity-entry time { flex: none; font-size: 13px; color: var(--texte-2); }
#contenu .activity-entry p { margin: 1px 0 0 !important; font-size: 15px; line-height: 1.3; color: var(--texte) !important; }
#contenu .activity-entry p.activity-type { margin-top: 1px !important; font-weight: 500; }
#contenu .activity-entry p:not(.activity-type) { color: var(--texte-2) !important; font-size: 14px; }
#contenu #historique-activites > p.aide { margin-top: 4px; }
