/* =====================================================================
   EFFAGREEN v3.6 — Thème « Terroir Pro »
   Chargé après app.css : redéfinit la charte (couleurs, typographie,
   icônes au trait, surfaces) sans toucher à la structure des pages.
   ===================================================================== */

/* ---------------------------------------------------------------- Polices embarquées (fonctionnent hors ligne) */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
    src: url(../fonts/inter-latin-wght-normal.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
    src: url(../fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
    src: url(../fonts/manrope-latin-wght-normal.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
    src: url(../fonts/manrope-latin-ext-wght-normal.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------------------------------------------------------------- Jetons de la charte */
:root {
    --brand: #1d6b43;
    --brand-600: #23824f;
    --brand-700: #14512f;
    --brand-50: #eef6f0;
    --brand-100: #d6ebdc;
    --primary: var(--brand);
    --earth: #a86f12;
    --earth-50: #fbf3e1;
    --gold: #d9a43a;

    --bg: #f3f2ec;
    --surface: #ffffff;
    --surface-2: #f7f6f1;
    --text: #17241c;
    --text-2: #34423a;
    --muted: #69766e;
    --border: #e6e3d9;
    --border-strong: #d4d0c3;

    --side-bg: #0d2619;
    --side-text: #cbd9cf;
    --side-muted: #85a090;
    --side-hover: rgba(255, 255, 255, .06);
    --side-active: rgba(255, 255, 255, .10);

    --success: #1d7a46; --success-bg: #e1f2e6;
    --warning: #a35f08; --warning-bg: #fcf0d6;
    --danger: #b42318;  --danger-bg: #fde7e4;
    --info: #1f5fa8;    --info-bg: #e2eefb;
    --neutral: #4d5a52; --neutral-bg: #eeefe9;
    --violet: #6b3fb5;  --violet-bg: #efe8fa;

    --radius: 14px;
    --radius-sm: 9px;
    --shadow-1: 0 1px 2px rgba(31, 41, 24, .05), 0 1px 1px rgba(31, 41, 24, .03);
    --shadow-2: 0 10px 30px -8px rgba(23, 36, 28, .16), 0 3px 8px rgba(23, 36, 28, .06);
    --shadow-3: 0 30px 70px -10px rgba(13, 38, 25, .32);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-d: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --side-w: 256px;
    --head-h: 62px;
}

body { font-size: 14px; font-feature-settings: "cv11", "ss01"; letter-spacing: -.003em; }
h1, h2, h3, h4, .top-title, .card-h h3, .drawer-h h2, .modal-h h2, .kpi .kv, .login-card h2, .login-hero h1, .side-head .sh-n, .login-brand {
    font-family: var(--font-d); letter-spacing: -.02em;
}
h1 { font-size: 24px; font-weight: 800; } h2 { font-weight: 750; } h3 { font-weight: 700; }
::selection { background: #cfe8d6; color: var(--text); }
* { scrollbar-width: thin; scrollbar-color: #cdc9bb transparent; }

/* ---------------------------------------------------------------- Icônes au trait */
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; stroke-width: 1.9; }
.btn .ic { width: 16px; height: 16px; vertical-align: middle; }
.btn-sm .ic { width: 14px; height: 14px; }
.btn-icon > .ic { width: 18px; height: 18px; }
.ptab .ic { width: 15px; height: 15px; opacity: .85; }
.card-h h3 .ic { width: 17px; height: 17px; color: var(--brand); margin-right: 6px; vertical-align: -.22em; }
.fsec-t .ic { width: 14px; height: 14px; margin-right: 4px; }
.empty .ei .ic { width: 38px; height: 38px; stroke-width: 1.5; color: #9aa79f; }
.li .lic .ic { width: 16px; height: 16px; color: var(--brand); }
.hsc > span .ic { width: 18px; height: 18px; color: var(--brand); }
.tpl .ic { width: 18px; height: 18px; color: var(--brand); }

/* ---------------------------------------------------------------- Boutons & champs */
.btn { height: 36px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13.5px; border-color: var(--border-strong);
    box-shadow: 0 1px 1px rgba(23, 36, 28, .04); transition: background .15s, border-color .15s, box-shadow .15s, transform .1s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:hover { background: #faf9f5; border-color: #c4bfae; }
.btn-primary { background: linear-gradient(180deg, #23824f, #1d6b43); border-color: #1a6540; color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 1px 2px rgba(20, 81, 47, .3); }
.btn-primary:hover { background: linear-gradient(180deg, #1f7848, #175c39); border-color: #14512f; }
.btn-success { background: var(--brand-600); border-color: var(--brand-600); }
.btn-danger { border-color: #f0c2bc; }
.btn-ghost { box-shadow: none; }
.btn-ghost:hover { background: rgba(23, 36, 28, .055); }
.btn-lg { height: 46px; border-radius: 11px; font-size: 15px; }
.btn:focus-visible, .ptab:focus-visible, .nav-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number], input[type=date],
input[type=datetime-local], input[type=time], input[type=month], input[type=search], input[type=file], select, textarea, .form-control {
    border-radius: var(--radius-sm); border-color: var(--border-strong); background-color: #fff; min-height: 38px;
}
input:hover:not(:focus):not([readonly]), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: #bdb8a8; }
input:focus, select:focus, textarea:focus, .form-control:focus { border-color: var(--brand-600); box-shadow: 0 0 0 3.5px rgba(35, 130, 79, .15); }
.field > span, .fld-label { font-size: 12.5px; color: var(--text-2); }
.toggle .track { background: #cfcbbd; }
.toggle input:checked + .track { background: var(--brand-600); }
.check input, .perm-matrix input { accent-color: var(--brand); }

/* ---------------------------------------------------------------- Alertes & badges */
.alert { border-radius: 11px; padding: 11px 14px; }
.alert-danger { background: #fdf0ee; border-color: #f6cdc7; color: #7a1d14; }
.alert-info { background: #edf4fc; border-color: #c9dcf3; color: #17406f; }
.alert-warning { background: #fdf6e6; border-color: #f2dba7; color: #6e4106; }
.alert-success { background: #ecf7ef; border-color: #c4e5cd; color: #124d2b; }
.badge { font-weight: 600; font-size: 11.5px; padding: 2px 9px; border: 1px solid transparent; }
.b-success { border-color: #c4e5cd; } .b-warning { border-color: #f2dba7; } .b-danger { border-color: #f6cdc7; } .b-info { border-color: #c9dcf3; } .b-violet { border-color: #dccff2; }

/* ---------------------------------------------------------------- Barre latérale */
.side { background: radial-gradient(420px 260px at 0% 0%, rgba(74, 160, 105, .20), transparent 70%), linear-gradient(180deg, #0f2c1d 0%, #0b2217 100%);
    box-shadow: 1px 0 0 rgba(255,255,255,.03); }
.side::after { content: ""; position: absolute; left: 0; right: 0; bottom: 64px; height: 120px; pointer-events: none; opacity: .5;
    background: radial-gradient(300px 120px at 50% 120%, rgba(217, 164, 58, .14), transparent 70%); }
.side-head { height: var(--head-h); border-bottom-color: rgba(255,255,255,.07); gap: 11px; }
.side-head img { width: 32px; height: 32px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.side-head .sh-n { font-size: 18px; font-weight: 800; }
.side-head small { background: rgba(255,255,255,.07); color: #a8c0b0; padding: 1px 7px; border-radius: 99px; font-size: 10.5px; font-weight: 600; }
.side-nav { padding: 8px 12px 20px; scrollbar-color: rgba(255,255,255,.14) transparent; position: relative; z-index: 1; }
.nav-sec { font-family: var(--font-d); font-size: 10.5px; letter-spacing: .12em; color: #6f8d7b; padding: 18px 10px 6px; }
.nav-link { padding: 8px 10px; border-radius: 10px; font-size: 13.5px; color: var(--side-text); margin: 1px 0; transition: background .15s, color .15s; }
.nav-link .ni { width: 20px; display: grid; place-items: center; color: #8fb09c; transition: color .15s; }
.nav-link .ni .ic { width: 18px; height: 18px; stroke-width: 1.8; }
.nav-link:hover { background: var(--side-hover); }
.nav-link:hover .ni { color: #d3e7d9; }
.nav-link.active { background: linear-gradient(90deg, rgba(134, 214, 160, .16), rgba(134, 214, 160, .06)); color: #fff;
    box-shadow: inset 0 0 0 1px rgba(134, 214, 160, .12); }
.nav-link.active .ni { color: #9be3b2; }
.nav-link.active::before { left: -12px; top: 8px; bottom: 8px; width: 3px; background: var(--gold); }
.nav-link .nb { background: #e0533f; box-shadow: 0 0 0 2px #0e281b; }
.side-foot { border-top-color: rgba(255,255,255,.07); position: relative; z-index: 1; }
.me-card { border-radius: 11px; }
.me-card:hover { background: var(--side-hover); }
.avatar { background: linear-gradient(135deg, #d9a43a, #a86f12); box-shadow: 0 0 0 2px rgba(255,255,255,.08); }
.side-toggle { border-radius: 7px; }

/* ---------------------------------------------------------------- En-tête */
.top { background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom-color: var(--border); padding: 0 24px; }
.top-title { font-size: 18px; font-weight: 800; }
.farm-switch { border-radius: 10px; font-weight: 600; background-color: var(--surface-2); }
.gsearch input { border-radius: 10px; background: var(--surface-2); border-color: var(--border); }
.gsearch input:focus { background: #fff; }
.gsearch .ico .ic { width: 16px; height: 16px; }
.top .btn-icon { border-radius: 10px; color: var(--text-2); }
.top .btn-icon .ic { width: 19px; height: 19px; }
.bell .cnt { background: #e0533f; border-color: #fff; }
.content { padding: 24px 26px 40px; }
.gsearch-res, .alerts-panel { border-radius: 14px; box-shadow: var(--shadow-2); }
.gs-item { border-radius: 9px; }
.gs-item:hover, .gs-item.on { background: var(--brand-50); }

/* ---------------------------------------------------------------- Onglets de page */
.ptabs { gap: 4px; border-bottom-color: var(--border); margin-bottom: 20px; }
.ptab { padding: 10px 13px; font-weight: 600; color: var(--muted); border-bottom-width: 2.5px; border-radius: 8px 8px 0 0; transition: color .15s, background .15s; }
.ptab:hover { color: var(--text); background: rgba(23, 36, 28, .035); }
.ptab.active { color: var(--brand-700); border-bottom-color: var(--brand); }

/* ---------------------------------------------------------------- Cartes */
.card { border-radius: var(--radius); border-color: var(--border); box-shadow: var(--shadow-1); }
.card-h { padding: 15px 18px; border-bottom-color: #efede5; }
.card-h h3 { font-size: 15px; font-weight: 750; }
.card-b { padding: 18px; }
.card-f { border-top-color: #efede5; }
.grid { gap: 18px; }

/* ---------------------------------------------------------------- Indicateurs (KPI) */
.kpis { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { border-radius: var(--radius); padding: 16px 18px; gap: 14px; position: relative; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.kpi::after { content: ""; position: absolute; right: -28px; top: -28px; width: 90px; height: 90px; border-radius: 50%; background: var(--brand-50); opacity: .7; pointer-events: none; }
.kpi:hover { box-shadow: var(--shadow-2); }
.kpi .ki { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-50); color: var(--brand); box-shadow: inset 0 0 0 1px rgba(29, 107, 67, .1); position: relative; z-index: 1; }
.kpi .ki .ic { width: 21px; height: 21px; }
.kpi > div:last-child { position: relative; z-index: 1; }
.kpi .kl { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .005em; }
.kpi .kv { font-size: 23px; font-weight: 800; line-height: 1.2; margin-top: 2px; color: var(--text); }
.kpi .ks { font-size: 12px; margin-top: 1px; }
.kpi.k-earth .ki { background: var(--earth-50); color: var(--earth); box-shadow: inset 0 0 0 1px rgba(168, 111, 18, .14); } .kpi.k-earth::after { background: var(--earth-50); }
.kpi.k-blue .ki { background: var(--info-bg); color: var(--info); box-shadow: inset 0 0 0 1px rgba(31, 95, 168, .12); } .kpi.k-blue::after { background: var(--info-bg); }
.kpi.k-red .ki { background: var(--danger-bg); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(180, 35, 24, .12); } .kpi.k-red::after { background: var(--danger-bg); }
.kpi.k-violet .ki { background: var(--violet-bg); color: var(--violet); } .kpi.k-violet::after { background: var(--violet-bg); }

/* ---------------------------------------------------------------- Listes */
.li { padding: 11px 18px; border-bottom-color: #efede5; }
.li.click:hover { background: #f9f8f3; }
.li .lic { width: 32px; height: 32px; border-radius: 10px; background: var(--brand-50); }
.empty { padding: 36px 16px; }
.empty .ei { opacity: 1; }

/* ---------------------------------------------------------------- Tableaux */
.toolbar { gap: 8px; margin-bottom: 14px; }
.toolbar select, .toolbar input[type=date], .toolbar .search input { height: 36px; min-height: 36px; border-radius: 10px; }
.tbl th { background: #faf9f5; color: #77827b; font-size: 11px; letter-spacing: .06em; padding: 11px 14px; border-bottom-color: var(--border); }
.tbl td { padding: 12px 14px; border-bottom-color: #efede5; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover td { background: #f6faf6; }
.tbl tfoot td { background: #faf9f5; }
.pager { border-top-color: #efede5; }
.tbl td.actions .btn { border-color: transparent; box-shadow: none; background: transparent; color: var(--muted); }
.tbl td.actions .btn:hover { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.tbl td.actions .btn-danger:hover { background: var(--danger-bg); color: var(--danger); border-color: #f6cdc7; }
.card > .tbl-wrap:first-child .tbl th:first-child, .card-b.flush > .tbl-wrap:first-child .tbl th:first-child { border-top-left-radius: var(--radius); }
.card > .tbl-wrap:first-child .tbl th:last-child, .card-b.flush > .tbl-wrap:first-child .tbl th:last-child { border-top-right-radius: var(--radius); }

/* ---------------------------------------------------------------- Formulaires, panneaux, modales */
.overlay, .modal { background: rgba(10, 28, 18, .42); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.drawer { background: var(--bg); border-radius: 18px 0 0 18px; overflow: hidden; }
.drawer-h { height: 64px; background: #fff; }
.drawer-h h2 { font-size: 18px; }
.drawer-f { background: #fff; }
.fsec { border-radius: 13px; padding: 16px 18px 4px; box-shadow: var(--shadow-1); }
.fsec-t { color: var(--brand-700); letter-spacing: .08em; font-family: var(--font-d); font-weight: 800; display: flex; align-items: center; gap: 8px; }
.fsec-t::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--gold); flex: none; }
.ro-val { border-radius: var(--radius-sm); }
.modal-box { border-radius: 18px; }
.modal-h { padding: 18px 22px; }
.modal-b { padding: 20px 22px; }
.modal-f { padding: 14px 22px; background: #faf9f5; border-radius: 0 0 18px 18px; }
.toast { border-radius: 12px; background: #13281c; box-shadow: 0 14px 34px -8px rgba(0,0,0,.4); }

/* ---------------------------------------------------------------- Calendrier, kanban, divers */
.cal { border-radius: 12px; overflow: hidden; border-color: var(--border); }
.cal-h { background: #faf9f5; }
.cal-d { border-color: #efede5; }
.cal-d.out { background: #f8f7f2; }
.cev { border-radius: 6px; }
.kcol { background: #ebe9e0; border-radius: 14px; }
.kcard { border-radius: 11px; transition: box-shadow .15s, transform .15s; }
.kcard:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.progress { background: #e9e6db; }
.progress > i { background: linear-gradient(90deg, #2f9a5f, #1d6b43); }
.tpl { border-radius: 11px; }
.dropzone { border-radius: 14px; }
#topbar-progress { background: linear-gradient(90deg, #d9a43a, #23824f); }
.seg { border-radius: 10px; }
.seg button { border-radius: 8px; }

/* ---------------------------------------------------------------- Connexion */
.login-page { background: #0d2619; }
.login-hero { position: relative; overflow: hidden; justify-content: flex-start; padding-top: 72px;
    background: url(../img/campagne.svg) center bottom / 100% auto no-repeat,
        radial-gradient(900px 520px at 85% 22%, rgba(217, 164, 58, .20), transparent 60%),
        linear-gradient(180deg, #0f2c1d 0%, #133826 60%, #164229 100%); }
.login-brand { font-size: 24px; }
.login-brand img { filter: drop-shadow(0 4px 12px rgba(0,0,0,.3)); }
.login-hero h1 { font-size: 38px; font-weight: 800; line-height: 1.12; max-width: 560px; }
.login-points { gap: 12px; }
.login-points li { color: #dbe7df; }
.login-points span { width: 36px; height: 36px; border-radius: 11px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); color: #f2cd7a; }
.login-points span .ic { width: 18px; height: 18px; }
.login-foot { color: #e3ece6; margin-top: 8px; position: relative; text-shadow: 0 1px 6px rgba(0,0,0,.45); font-weight: 500; }
.login-card .btn-block { margin-bottom: 14px; }
.login-panel { background: var(--bg); background-image: radial-gradient(600px 300px at 100% 0%, rgba(217, 164, 58, .10), transparent 70%); }
.login-card { border-radius: 20px; padding: 36px 34px; box-shadow: var(--shadow-2); border-color: var(--border); }
.login-card h2 { font-size: 26px; font-weight: 800; }
.login-espace { border-radius: 13px; }

/* ---------------------------------------------------------------- Ma journée */
.home-hero { position: relative; overflow: hidden; border-radius: 20px;
    background: radial-gradient(700px 300px at 90% 0%, rgba(217, 164, 58, .25), transparent 60%),
        linear-gradient(135deg, #123a26 0%, #1a5634 55%, #2c6a2f 100%);
    box-shadow: 0 18px 40px -18px rgba(13, 38, 25, .55); }
.home-hero::before { content: ""; position: absolute; inset: auto 0 0 0; height: 100%; pointer-events: none; opacity: .32;
    background: url(../img/campagne.svg) center bottom / 100% auto no-repeat; }
.home-hero > * { position: relative; z-index: 1; }
.home-hero h1 { font-size: 30px; font-weight: 800; }
.hchip > span:first-child .ic { width: 15px; height: 15px; color: #f2cd7a; }
.home-wx .hw-d .ic, .home-hero .ic { color: #f2cd7a; }
.hchip { border-radius: 99px; backdrop-filter: blur(6px); }
.home-wx { border-radius: 16px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background: rgba(9, 30, 19, .35); }
.hsc { border-radius: 12px; box-shadow: var(--shadow-1); transition: transform .15s, border-color .15s, box-shadow .15s; }
.hsc:hover { box-shadow: var(--shadow-2); }
.hcheck:hover { border-color: var(--brand-600); }
.home-task.done .hcheck { background: var(--brand-600); border-color: var(--brand-600); }

/* ---------------------------------------------------------------- Modules */
.cs-score.good { border-color: #23824f; background: #eef6f0; }
.chat { border-radius: var(--radius); overflow: hidden; }
.chat-main { background: #f2f1ea; }
.chat-m.me .bub { background: #dcefdf; }
.chat-it { border-radius: 11px; }
.chat-it.on { background: var(--brand-50); }
.wx-day { border-radius: 12px; }
.map-tb, .geo-s input { border-radius: 11px; }
.rd-card { border-radius: 14px; }

/* ---------------------------------------------------------------- Menu réduit */
@media (min-width: 981px) {
    .app.side-mini .nav-link .ni .ic { width: 20px; height: 20px; }
    .app.side-mini .nav-link.active::before { left: -12px; }
}

/* ---------------------------------------------------------------- Mobile */
@media (max-width: 860px) {
    .content { padding: 16px 14px 28px; }
    .top { padding: 0 12px; }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .kpi { padding: 13px; }
    .kpi .ki { width: 34px; height: 34px; border-radius: 10px; }
    .kpi .ki .ic { width: 18px; height: 18px; }
    .kpi .kv { font-size: 18px; }
    .kpi::after { width: 64px; height: 64px; right: -22px; top: -22px; }
    .drawer { border-radius: 0; }
    .modal-box, .modal-box.lg, .modal-box.md { border-radius: 18px 18px 0 0; }
    .modal-f { border-radius: 0; }
    .login-hero { padding: 32px 24px 120px; background-size: 160% auto, auto, auto; }
    .login-hero h1 { font-size: 27px; }
    
    .ptabs { margin-left: -14px; margin-right: -14px; padding: 0 8px; }
}

@media print {
    .home-hero { background: #1d6b43 !important; }
    .kpi::after { display: none; }
}

/* =====================================================================
   Accueil circulaire (roue des modules)
   ===================================================================== */
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.content:has(> #page > .hub) { padding: 0; }
.hub { --teal: #0e4f45; --teal-2: #13695a; --cream: #f7f3e9;
    position: relative; overflow: hidden; height: calc(100vh - var(--head-h)); min-height: 560px; outline: none;
    background: var(--cream); color: var(--teal); user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.hub-glow { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(10px); }
.hub-glow.g1 { width: 520px; height: 520px; right: -140px; top: -180px; background: radial-gradient(circle, rgba(126, 190, 150, .38), transparent 68%); }
.hub-glow.g2 { width: 560px; height: 560px; left: calc(var(--cx) + var(--R) - 120px); bottom: -300px; background: radial-gradient(circle, rgba(126, 190, 150, .30), transparent 68%); }
.hub-wheat { position: absolute; right: 40px; bottom: -20px; width: 190px; height: 400px; color: #e7d6b4; opacity: .7; pointer-events: none; }
.hub-farm { position: absolute; top: 22px; right: 26px; z-index: 3; display: inline-flex; gap: 7px; align-items: center; background: var(--teal); color: #fff;
    font: 700 13px var(--font-d); padding: 6px 14px; border-radius: 99px; box-shadow: 0 6px 16px -6px rgba(14, 79, 69, .6); max-width: 320px; }
.hub-farm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-farm .ic { width: 14px; height: 14px; color: #f2cd7a; }
.hub-hello { position: absolute; top: 30px; left: 32px; z-index: 3; font: 600 13px var(--font); color: #5d7a72; text-transform: capitalize; }

/* Grand cercle */
.hub-circle { position: absolute; z-index: 2; width: var(--D); height: var(--D); left: calc(var(--cx) - var(--D) / 2); top: calc(var(--cy) - var(--D) / 2);
    border-radius: 50%; overflow: hidden; background: #dfe9dc;
    box-shadow: 0 0 0 16px var(--teal), 0 0 0 17px rgba(255,255,255,.35), 0 40px 80px -30px rgba(14, 79, 69, .55); }
.hub-scene { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .55s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.hub-scene.in { opacity: 0; transform: rotate(-14deg) scale(1.06); }
.hub-scene.out { opacity: 0; transform: rotate(10deg) scale(1.04); }

/* Roue */
.hub-wheel { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hub-item { position: absolute; left: var(--cx); top: var(--cy); pointer-events: auto; opacity: var(--o, 1);
    transform: rotate(var(--a)) translateX(var(--R)) rotate(calc(-1 * var(--a))) translateY(-50%);
    transition: --a .55s cubic-bezier(.3, .9, .25, 1), opacity .4s; }
.hub-item.off { pointer-events: none; }
.hub-item.jump { transition: none; }
.hub-item:focus { outline: none; }
.hub-item:focus-visible button { outline: 2px solid var(--gold); outline-offset: 3px; }
.hub-item .hi-l { max-width: 250px; overflow: hidden; text-overflow: ellipsis; }
.hub-item button { display: inline-flex; align-items: center; gap: 9px; border: 0; background: transparent; color: var(--teal); cursor: pointer;
    font: 600 14px var(--font-d); padding: 6px 14px 6px 8px; border-radius: 99px; white-space: nowrap; transition: background .25s, color .25s, padding .25s, box-shadow .25s, transform .25s; }
.hub-item .hi-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(14, 79, 69, .08); transition: background .25s; flex: none; }
.hub-item .hi-ic .ic { width: 16px; height: 16px; }
.hub-item .hi-b { background: #e0533f; color: #fff; font: 700 10.5px var(--font); border-radius: 99px; padding: 1px 6px; }
.hub-item button:hover { background: rgba(14, 79, 69, .07); }
.hub-item button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hub-item.on button { background: var(--teal); color: #fff; font-size: 16px; font-weight: 800; padding: 9px 22px 9px 9px; transform: translateX(14px);
    box-shadow: 0 12px 26px -10px rgba(14, 79, 69, .7); }
.hub-item.on .hi-ic { background: rgba(255,255,255,.14); color: #f2cd7a; width: 34px; height: 34px; }
.hub-item.on .hi-ic .ic { width: 18px; height: 18px; }

.hub-nav { position: absolute; z-index: 4; left: calc(var(--cx) + var(--D) / 2 - 4px); top: calc(var(--cy) - 18px); display: none; }
.hub-arr { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: var(--teal); box-shadow: var(--shadow-2); cursor: pointer; display: grid; place-items: center; }
.hub-arr .ic { width: 18px; height: 18px; }
.hub-arr[data-d="-1"] .ic { transform: rotate(180deg); }

/* Panneau du module sélectionné */
.hub-panel { position: absolute; z-index: 3; left: var(--panel-l, 60%); right: 48px; top: 50%; transform: translateY(-50%); max-width: 560px; }
.hub-panel.swap { animation: hubIn .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes hubIn { from { opacity: 0; transform: translateY(calc(-50% + 14px)); } }
.hub-eyebrow { display: flex; align-items: center; gap: 8px; font: 800 11.5px var(--font-d); letter-spacing: .14em; text-transform: uppercase; color: #6c8a81; margin-bottom: 8px; }
.hub-eyebrow .ic { width: 16px; height: 16px; color: var(--teal-2); }
.hub-badge { background: #e0533f; color: #fff; border-radius: 99px; padding: 0 7px; letter-spacing: 0; }
.hub-title { font: 800 clamp(34px, 4.6vw, 64px)/1 var(--font-d); text-transform: uppercase; letter-spacing: .005em; color: var(--teal); margin: 0 0 14px; overflow-wrap: normal; hyphens: manual; }
.hub-title.l { font-size: clamp(30px, 3.6vw, 50px); }
.hub-title.xl { font-size: clamp(26px, 3vw, 40px); }
.hub-desc { font-size: 15.5px; line-height: 1.55; color: #3e5e56; max-width: 460px; margin-bottom: 18px; }
.hub-figs { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.hub-figs > div { background: #fff; border: 1px solid #e7e1d1; border-radius: 16px; padding: 10px 16px; min-width: 130px; box-shadow: 0 8px 20px -14px rgba(14, 79, 69, .45); }
.hub-figs strong { display: block; font: 800 22px var(--font-d); color: var(--teal); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hub-figs span { font-size: 12px; color: #6c8a81; font-weight: 600; }
.hub-subs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; max-width: 520px; }
.hub-subs a { font-size: 12.5px; font-weight: 600; color: var(--teal); background: rgba(14, 79, 69, .07); border: 1px solid rgba(14, 79, 69, .1); padding: 4px 11px; border-radius: 99px; text-decoration: none; transition: background .15s; }
.hub-subs a:hover { background: rgba(14, 79, 69, .14); }
.hub-cta { display: inline-flex; align-items: center; gap: 10px; background: var(--teal); color: #fff !important; font: 800 15px var(--font-d); padding: 12px 22px; border-radius: 99px;
    text-decoration: none !important; box-shadow: 0 14px 30px -12px rgba(14, 79, 69, .8); transition: transform .15s, background .15s; }
.hub-cta:hover { background: var(--teal-2); transform: translateY(-1px); }
.hub-cta .ic { width: 18px; height: 18px; color: #f2cd7a; }
.hub-hint { position: absolute; z-index: 3; left: var(--panel-l, 60%); bottom: 20px; font-size: 12px; color: #8aa39b; }

@media (prefers-reduced-motion: reduce) { .hub-item, .hub-scene { transition: none; } .hub-panel.swap { animation: none; } }

/* =====================================================================
   Navigation sans barre latérale : la roue de l'accueil sert de menu
   ===================================================================== */
.app.no-side .side, .app.no-side .backdrop-side, .app.no-side .burger { display: none !important; }
.app.no-side .main { margin-left: 0 !important; }
.top-home { display: inline-flex; align-items: center; gap: 9px; text-decoration: none !important; color: var(--text) !important; padding: 4px 12px 4px 4px; margin-right: 4px;
    border-radius: 12px; border-right: 1px solid var(--border); transition: background .15s; flex: none; }
.top-home:hover { background: var(--surface-2); }
.top-home img { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 3px 8px -3px rgba(13, 38, 25, .5); }
.top-home span { font: 800 17px var(--font-d); letter-spacing: -.02em; color: #0e4f45; }
.top-me { width: 36px; height: 36px; border: 0; cursor: pointer; font: 700 13px var(--font); flex: none; transition: transform .15s, box-shadow .15s; }
.top-me:hover { transform: scale(1.05); box-shadow: 0 0 0 3px var(--brand-100); }
.top-me:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 860px) {
    .top-home { padding-right: 8px; margin-right: 0; }
    .top-home span { display: none; }
    .top-me { width: 32px; height: 32px; font-size: 12px; }
}
@media (max-width: 560px) {
    .top-title { display: none; }
    .top-spacer { flex: 1; }
    .top { gap: 6px; }
    .farm-switch { max-width: 140px; }
}

/* ---------------------------------------------------------------- Roue en orbite (téléphone, tablette, portrait) */
.hub.hub-o { height: auto; min-height: calc(100vh - var(--head-h)); padding-bottom: 32px; touch-action: pan-y; }
.hub-o .hub-hello { left: 0; right: 0; top: 18px; text-align: center; }
.hub-o .hub-farm { display: none; }
.hub-o .hub-circle { box-shadow: 0 0 0 10px var(--teal), 0 0 0 11px rgba(255,255,255,.35), 0 30px 60px -30px rgba(14, 79, 69, .55); }
.hub-o .hub-item { transform: rotate(var(--a)) translateX(var(--R)) rotate(calc(-1 * var(--a))) translate(-50%, -50%); }
.hub-o .hub-item button { width: var(--b); height: var(--b); padding: 0; justify-content: center; background: #fff; border: 1px solid #e3dccb; box-shadow: 0 6px 14px -8px rgba(14, 79, 69, .5); }
.hub-o .hub-item .hi-l { display: none; }
.hub-o .hub-item .hi-ic { background: transparent; width: auto; height: auto; }
.hub-o .hub-item .hi-ic .ic { width: calc(var(--b) * .46); height: calc(var(--b) * .46); }
.hub-o .hub-item .hi-b { position: absolute; top: -5px; right: -5px; }
.hub-o .hub-item button { position: relative; }
.hub-o .hub-item.on button { width: calc(var(--b) * 1.45); height: calc(var(--b) * 1.45); padding: 0; transform: none; background: var(--teal); border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(217, 164, 58, .55), 0 12px 24px -8px rgba(14, 79, 69, .7); }
.hub-o .hub-item.on .hi-ic { background: transparent; width: auto; height: auto; }
.hub-o .hub-item.on .hi-ic .ic { width: calc(var(--b) * .62); height: calc(var(--b) * .62); }
.hub-o .hub-panel { position: relative; left: auto; right: auto; top: auto; transform: none; max-width: 640px; margin: calc(var(--cy) + var(--R) + var(--b) + 14px) auto 0; padding: 0 22px; text-align: center; }
.hub-o .hub-panel.swap { animation: hubInO .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes hubInO { from { opacity: 0; transform: translateY(10px); } }
.hub-o .hub-eyebrow, .hub-o .hub-figs, .hub-o .hub-subs { justify-content: center; }
.hub-o .hub-desc { margin-left: auto; margin-right: auto; }
.hub-o .hub-subs { margin-left: auto; margin-right: auto; }
.hub-o .hub-title { font-size: clamp(30px, 8vw, 52px); }
.hub-o .hub-title.l { font-size: clamp(26px, 6.6vw, 44px); }
.hub-o .hub-title.xl { font-size: clamp(22px, 5.6vw, 36px); }
.hub-o .hub-hint { position: static; text-align: center; margin-top: 18px; }
.hub-o .hub-glow.g2 { left: 50%; transform: translateX(-50%); bottom: -320px; }
.hub-o .hub-wheat { width: 120px; height: 250px; right: 4px; bottom: 0; opacity: .55; }

/* =====================================================================
   Accueil circulaire — fond vert à hexagones (v3.6)
   ===================================================================== */
.hub { --teal: #1f5a17; --teal-2: #2b7420; --lime: #a6d85a;
    background: #2b6a1d url(../img/fond-hub.svg) center / cover no-repeat; color: #fff; }
.hub-glow { display: none; }
.hub-wheat { color: #ffffff; opacity: .16; }
.hub-farm { display: none; }
.hub-hello { position: absolute; z-index: 3; top: 30px; left: var(--panel-l, 55%); right: 32px; text-transform: none; color: #fff; }
.hub-hello strong { display: block; font: 800 clamp(26px, 2.6vw, 38px)/1.1 var(--font-d); letter-spacing: -.02em; text-shadow: 0 2px 12px rgba(0,0,0,.18); }
.hub-hello span { display: block; margin-top: 6px; font: 600 14.5px var(--font); color: rgba(255,255,255,.78); }
.hub-hello span::first-letter { text-transform: uppercase; }
.hub-circle { background: #dfe9dc; box-shadow: 0 0 0 12px #ffffff, 0 0 0 20px rgba(166, 216, 90, .35), 0 40px 80px -24px rgba(0, 0, 0, .55); }
/* modules de la roue */
.hub-item button { color: rgba(255,255,255,.92); }
.hub-item .hi-ic { background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.hub-item button:hover { background: rgba(255,255,255,.1); }
.hub-item.on button { background: #fff; color: var(--teal); box-shadow: 0 0 0 4px rgba(166, 216, 90, .45), 0 14px 30px -10px rgba(0,0,0,.5); }
.hub-item.on .hi-ic { background: var(--teal); color: var(--lime); box-shadow: none; }
/* panneau */
.hub-eyebrow { color: var(--lime); }
.hub-eyebrow .ic { color: var(--lime); }
.hub-title { color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.15); }
.hub-desc { color: rgba(255,255,255,.86); }
.hub-figs > div { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); box-shadow: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hub-figs strong { color: #fff; }
.hub-figs span { color: rgba(255,255,255,.75); }
.hub-subs a { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); }
.hub-subs a:hover { background: rgba(255,255,255,.22); }
.hub-cta { background: #fff; color: var(--teal) !important; box-shadow: 0 14px 30px -12px rgba(0,0,0,.5); }
.hub-cta:hover { background: #f0f8e4; }
.hub-cta .ic { color: #6fae2e; }
.hub-hint { color: rgba(255,255,255,.6); }
/* orbite (téléphone, tablette) */
.hub-o .hub-hello { left: 16px; right: 16px; top: 22px; text-align: center; }
.hub-o .hub-hello strong { font-size: clamp(26px, 7vw, 36px); }
.hub-o .hub-circle { box-shadow: 0 0 0 8px #ffffff, 0 0 0 14px rgba(166, 216, 90, .35), 0 30px 60px -24px rgba(0, 0, 0, .55); }
.hub-o .hub-item button { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; box-shadow: 0 6px 14px -8px rgba(0,0,0,.45); backdrop-filter: blur(4px); }
.hub-o .hub-item .hi-ic { box-shadow: none; background: transparent; }
.hub-o .hub-item.on button { background: #fff; border-color: #fff; color: var(--teal); box-shadow: 0 0 0 4px rgba(166, 216, 90, .6), 0 12px 24px -8px rgba(0,0,0,.5); }
.hub-o .hub-item.on .hi-ic { background: transparent; color: var(--teal); }

/* ---------------------------------------------------------------- Photo personnalisée du cercle */
.hub-photo { position: absolute; inset: -6%; width: 112%; height: 112%; object-fit: cover; transform-origin: 50% 50%; pointer-events: none; }
.hub-photo.spin { animation: hubSpin .8s cubic-bezier(.2, .8, .2, 1); }
@keyframes hubSpin { from { transform: rotate(-16deg) scale(1.08); filter: brightness(1.12); } }
.hub-shade { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, transparent 55%, rgba(0, 0, 0, .28) 100%); pointer-events: none; }
.hub-cbadge { position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255, 255, 255, .92); color: var(--teal); box-shadow: 0 0 0 5px rgba(166, 216, 90, .55), 0 12px 26px -8px rgba(0, 0, 0, .55); }
.hub-cbadge .ic { width: 30px; height: 30px; }
.hub-cbadge.pop { animation: hubPop .5s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes hubPop { from { transform: translateX(-50%) scale(.6); opacity: 0; } }
.hub-pctl { position: absolute; z-index: 5; left: 20px; bottom: 18px; display: flex; gap: 6px; }
.hub-pbtn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.3); background: rgba(10, 40, 12, .45); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    font: 600 12.5px var(--font); padding: 7px 12px; border-radius: 99px; cursor: pointer; }
.hub-pbtn:hover { background: rgba(10, 40, 12, .65); }
.hub-pbtn .ic { width: 15px; height: 15px; }
.hub-o .hub-pctl { position: relative; left: auto; bottom: auto; justify-content: center; margin-top: 14px; }
.hub-o .hub-cbadge { width: 48px; height: 48px; } .hub-o .hub-cbadge .ic { width: 23px; height: 23px; }
/* grand écran : le cercle déborde à gauche, on recentre la photo sur la partie visible */
.hub-a .hub-photo { inset: -6% -6% -6% 6%; width: 100%; }

/* =====================================================================
   Drones (v3.7)
   ===================================================================== */
.dr-empty { text-align: center; padding: 34px 20px; }
.dr-empty .ei .ic { width: 52px; height: 52px; color: var(--brand); stroke-width: 1.4; }
.dr-empty h2 { margin: 8px 0 6px; }
.dr-empty > p { color: var(--muted); max-width: 640px; margin: 0 auto 18px; }
.dr-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; text-align: left; max-width: 1000px; margin: 0 auto; }
.dr-feats > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.dr-feats .ic { width: 22px; height: 22px; color: var(--brand); }
.dr-feats span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.dr-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; padding: 14px 16px 16px; }
.dr-th { position: relative; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; text-decoration: none !important; color: inherit !important; background: #1e2a22; transition: box-shadow .15s, transform .15s; }
.dr-th:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.dr-th img { width: 100%; height: 120px; object-fit: contain; background: repeating-conic-gradient(#26332a 0 25%, #1e2a22 0 50%) 0 0 / 16px 16px; }
.dr-th > span { flex: 1; background: #fff; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.dr-th small { color: var(--muted); font-size: 11.5px; }
.dr-th em { position: absolute; top: 8px; right: 8px; font-style: normal; }
.dr-it { align-items: flex-start; cursor: pointer; }
.dr-it.off { opacity: .55; }
.dr-mini { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; background: #1e2a22; flex: none; border: 1px solid var(--border); }
.dr-acts { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; }
.dr-acts input[type=range] { width: 80px; accent-color: var(--brand); min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.dr-leg { min-width: 180px; }
.dr-leg-bar { height: 10px; border-radius: 99px; }
.dr-leg-l { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; color: var(--text-2); margin-top: 3px; }
.dr-imp .dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dr-imp .dropzone .ic { width: 28px; height: 28px; color: var(--brand); }
.dr-imp-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; margin-top: 6px; }
.dr-prev { background: repeating-conic-gradient(#e9e7df 0 25%, #f6f5f0 0 50%) 0 0 / 18px 18px; border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.dr-prev canvas { max-width: 100%; max-height: 420px; image-rendering: auto; }
.dr-cls { display: grid; gap: 4px; margin-top: 8px; font-size: 12.5px; }
.dr-cls > div { display: flex; align-items: center; gap: 8px; }
.dr-cls span { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.dr-cls b { margin-left: auto; font-variant-numeric: tabular-nums; }
.dr-mod { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; }
.dr-mod-map { min-height: 440px; border-radius: 12px; border: 1px solid var(--border); }
.dr-day { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.dr-dl { width: 92px; flex: none; font-weight: 700; font-size: 12.5px; text-transform: capitalize; }
.dr-hours { display: flex; flex-wrap: wrap; gap: 3px; }
.dr-h { width: 30px; height: 38px; border-radius: 7px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10.5px; line-height: 1.15; cursor: default; }
.dr-h b { font-weight: 700; } .dr-h i { font-style: normal; opacity: .8; }
.dr-h.ok { background: #dff1e3; color: #14512f; box-shadow: inset 0 0 0 1px #b9dfc3; }
.dr-h.no { background: #f8e6e2; color: #8a2a1d; box-shadow: inset 0 0 0 1px #efc7bf; }
.dr-h.mini { width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; }
@media (max-width: 900px) {
    .dr-imp-g, .dr-mod { grid-template-columns: minmax(0, 1fr); }
    .dr-mod-map { min-height: 300px; }
    .dr-dl { width: 64px; }
    .dr-h { width: 26px; }
}

/* ---------------------------------------------------------------- Photos de drone (v3.8) */
.dp-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 16px; height: calc(100vh - var(--head-h) - 170px); min-height: 480px; }
.dp-mapc, .dp-galc { overflow: hidden; }
#dp-map { height: 100%; }
.dp-galc { overflow-y: auto; }
.dp-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding: 12px; }
.dp-strip { display: flex; gap: 10px; overflow-x: auto; padding: 14px 16px 16px; }
.dp-strip .dp-th { width: 160px; flex: none; }
.dp-th { position: relative; display: flex; flex-direction: column; padding: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer; text-align: left; font: inherit; transition: box-shadow .15s, transform .15s; }
.dp-th:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.dp-th.sig { border-color: var(--c, #dc2626); box-shadow: 0 0 0 2px var(--c, #dc2626) inset; }
.dp-th img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e9e7df; display: block; }
.dp-th > span { padding: 6px 8px; font-size: 12.5px; font-weight: 600; display: flex; flex-direction: column; gap: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-th small { font-weight: 500; color: var(--muted); font-size: 11px; }
.dp-th em { position: absolute; top: 6px; left: 6px; font-style: normal; font-size: 10.5px; font-weight: 700; color: #fff; background: var(--c, #dc2626); padding: 1px 7px; border-radius: 99px; }
.dp-th b { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--brand); box-shadow: var(--shadow-1); }
.dp-th b .ic { width: 13px; height: 13px; }
.dp-imp .dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dp-imp .dropzone .ic { width: 28px; height: 28px; color: var(--brand); }
.dp-lst { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; font-size: 13px; max-height: 220px; overflow: auto; }
.dp-view { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(250px, 1fr); gap: 16px; }
.dp-img { position: relative; background: #111; border-radius: 12px; overflow: hidden; display: grid; place-items: center; min-height: 300px; }
.dp-img img { max-width: 100%; max-height: 70vh; display: block; }
.dp-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); font-size: 26px; line-height: 1; cursor: pointer; color: #111; }
.dp-nav.prev { left: 10px; } .dp-nav.next { right: 10px; }
.dp-etq { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dp-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); background: #fff; border-radius: 99px; padding: 4px 10px; font: 600 12px var(--font); cursor: pointer; color: var(--text-2); }
.dp-chip i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.dp-chip.on { border-color: var(--brand); background: var(--brand-50); color: var(--brand-700); }
@media (max-width: 900px) {
    .dp-layout { grid-template-columns: minmax(0, 1fr); height: auto; }
    #dp-map { height: 45vh; }
    .dp-galc { max-height: none; }
    .dp-view { grid-template-columns: minmax(0, 1fr); }
    .dp-gal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Formulaire ouvert depuis une fenêtre (ex. « Créer une tâche » depuis une photo) : au premier plan */
.modal.dp-visio ~ .overlay { z-index: 95; }
.modal.dp-visio ~ .drawer { z-index: 96; }
#dp-map { z-index: 1; position: relative; }

/* ---------------------------------------------------------------- Drones en direct (v3.8) */
.dd-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(330px, 1fr); gap: 16px; height: calc(100vh - var(--head-h) - 170px); min-height: 520px; }
.dd-mapc { overflow: hidden; position: relative; }
#dd-map { height: 100%; z-index: 1; position: relative; }
.dd-side { overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.dd-card { border-left: 4px solid var(--c); cursor: pointer; }
.dd-card.on { box-shadow: 0 0 0 2px var(--c), var(--shadow-2); }
.dd-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.dd-video { position: relative; background: #0b0f0c; aspect-ratio: 16 / 9; }
.dd-video video { width: 100%; height: 100%; object-fit: contain; display: block; }
.dd-vmsg { position: absolute; inset: 0; display: grid; place-items: center; color: #cbd5d0; font-size: 13px; text-align: center; padding: 12px; }
.dd-cap { position: absolute; right: 10px; bottom: 10px; background: rgba(255,255,255,.92); }
.dd-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.dd-kv > div { background: #fff; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dd-kv span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.dd-kv b { font: 800 16px var(--font-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.dd-bat { width: 34px; height: 9px; border-radius: 3px; border: 1px solid var(--border-strong); overflow: hidden; display: inline-block; }
.dd-bat i { display: block; height: 100%; }
.dd-meta { padding: 8px 14px; }
.dd-ph { display: flex; gap: 6px; overflow-x: auto; padding: 0 14px 12px; }
.dd-ph img { width: 72px; height: 54px; object-fit: cover; border-radius: 7px; cursor: pointer; flex: none; border: 1px solid var(--border); }
.dd-attente { text-align: center; padding: 34px 20px; }
.dd-attente .ic { width: 44px; height: 44px; color: var(--brand); stroke-width: 1.4; }
.dd-ico { background: none; border: 0; }
.dd-arrow { width: 44px; height: 44px; display: grid; place-items: center; color: var(--c); filter: drop-shadow(0 2px 4px rgba(0,0,0,.45)); transition: transform .8s linear; position: relative; z-index: 2; }
.dd-pulse { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: var(--c); opacity: .35; animation: ddPulse 1.8s ease-out infinite; z-index: 1; }
@keyframes ddPulse { from { transform: scale(.4); opacity: .55; } to { transform: scale(1.6); opacity: 0; } }
.dd-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; margin-right: 4px; animation: ddBlink 1.2s infinite; }
@keyframes ddBlink { 50% { opacity: .25; } }
.dd-statut { display: inline-flex; align-items: center; gap: 8px; }
.dd-statut .badge .ic { width: 13px; height: 13px; }
.dd-pre { background: #0f1f17; color: #d6f5df; border-radius: 10px; padding: 12px 14px; font: 12.5px/1.5 var(--mono); overflow: auto; max-height: 260px; }
.dd-ul { padding-left: 18px; display: grid; gap: 10px; font-size: 13.5px; }
.dd-ul code, .dd-rel code { word-break: break-all; font-size: 12px; }
@media (max-width: 1000px) {
    .dd-layout { grid-template-columns: minmax(0, 1fr); height: auto; }
    #dd-map { height: 50vh; }
    .dd-side { overflow: visible; }
}

/* ------------------------------------------------------------------ v3.9 : fond « champs au lever du soleil » des pages
   Photo fixe derrière les pages, voilée pour garder la lecture ; le bas laisse voir les cultures et le tracteur.
   Réglable par chaque utilisateur (menu du compte > Fond : uni). */
body:has(.app)::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        linear-gradient(180deg, rgba(247, 247, 241, .74) 0%, rgba(247, 247, 241, .64) 40%, rgba(247, 247, 241, .46) 74%, rgba(247, 247, 241, .30) 100%),
        url(../img/fond-champs.jpg) center 78% / cover no-repeat;
}
html.fond-uni body::before { display: none; }
@media (max-width: 760px) { body:has(.app)::before { background-position: center, 62% 80%; } }
@media print { body::before { display: none !important; } }
