/**
 * ============================================================
 * INTERFACE TERRAIN — le design mobile (préfixe ppt-)
 * ============================================================
 * Philosophie : une vraie application de poche, pas une page
 * web rétrécie. Concrètement :
 *   - contenu limité à 480px, centré (confortable aussi sur PC)
 *   - navigation FIXÉE EN BAS, à portée de pouce
 *   - gros boutons (44px minimum : la taille d'un doigt)
 *   - polices de 16px dans les champs (en dessous, iPhone zoome
 *     automatiquement sur le champ, très désagréable)
 *
 * Les :root déclarent des VARIABLES CSS : la palette est définie
 * une fois, réutilisée partout (var(--ppt-vert)). Pour changer
 * l'identité visuelle, on ne touche qu'ici.
 */

.ppt-app {
	/* ─────────────────────────────────────────────────────────
	 * PALETTE UNIQUE (mode clair). C'est LA source de vérité des
	 * couleurs : pour changer l'identité, on ne touche qu'ici.
	 * Le mode nuit redéfinit ces mêmes variables plus bas
	 * (html.ppt-nuit .ppt-app). Les variables --pp-* (design iOS)
	 * partagent les mêmes valeurs de vert : les deux vocabulaires
	 * sont alignés.
	 * ───────────────────────────────────────────────────────── */
	--ppt-vert: #1D9E3A;          /* le vert vif du logo (croix, PHARMA) */
	--pp-vert-vif: #1D9E3A;       /* alias utilisé par quelques composants iOS */
	--ppt-vert-fonce: #13583C;    /* le vert foncé du logo (périscope, texte) */
	--ppt-vert-fonce-2: #0f4a32;  /* variante plus sombre pour les états actifs */
	--ppt-vert-pale: #e4f4e9;
	--ppt-degrade: linear-gradient(140deg, #13583C 0%, #1D9E3A 115%); /* signature : réservé aux cartes de stats */
	--ppt-degrade-btn: linear-gradient(135deg, #1D9E3A, #13583C);     /* boutons pleins, onglet/état actif */
	--ppt-orange: #C77D0A;        /* orange ambre unique (attention, en attente) */
	--ppt-ambre: #C77D0A;         /* alias : même couleur que --ppt-orange */
	--ppt-ambre-pale: #FCF3E3;
	--ppt-rouge: #c0392b;         /* rouge brique unique (erreur, suppression, alerte) */
	--ppt-rouge-pale: #FBEAE8;
	--ppt-encre: #1c2b24;         /* le texte principal */
	--ppt-gris: #61707d;
	--ppt-fond: #f3f6f4;
	--ppt-carte: #ffffff;
	--ppt-bord: #e0e5e2;

	max-width: 480px;
	margin: 0 auto;
	padding: 0 12px 96px;         /* 96px en bas : la place de la barre de navigation */
	background: var(--ppt-fond);
	min-height: 100vh;
	color: var(--ppt-encre);
	font-size: 16px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------
 * EN-TÊTE
 * ------------------------------------------------------------ */
.ppt-entete {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 2px 10px;
}
.ppt-logo { font-size: 18px; color: var(--ppt-vert-fonce); letter-spacing: .2px; }
.ppt-logo strong { color: var(--ppt-vert); }
.ppt-logo-grand { font-size: 26px; display: block; margin-bottom: 8px; }
.ppt-user { display: block; font-size: 13px; color: var(--ppt-gris); }
.ppt-deconnexion { font-size: 13px; color: var(--ppt-gris); text-decoration: none; }

/* ------------------------------------------------------------
 * CARTES ET LIGNES
 * ------------------------------------------------------------ */
.ppt-carte {
	background: var(--ppt-carte);
	border: 1px solid var(--ppt-bord);
	border-radius: 16px;
	padding: 16px;
	margin-bottom: 14px;
	box-shadow: 0 2px 10px rgba(15, 74, 50, .05);
}
.ppt-carte h2 {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 16px;
	margin: 0 0 12px;
	color: var(--ppt-vert-fonce);
}
.ppt-vide { color: var(--ppt-gris); font-size: 14px; margin: 4px 0; }
.ppt-vide a { color: var(--ppt-vert); }

/* Les compteurs de l'accueil ("3 visites aujourd'hui"). */
.ppt-compteurs { display: flex; gap: 10px; margin-bottom: 14px; }
.ppt-compteur {
	flex: 1;
	background: var(--ppt-vert-pale);
	border-radius: 14px;
	padding: 12px 14px;
	text-decoration: none;
	color: var(--ppt-vert-fonce);
	font-size: 13px;
	line-height: 1.3;
}
/* Élément signature : le premier compteur porte le dégradé du logo,
   les suivants restent en vert-pâle sobre. Une seule zone forte. */
.ppt-compteurs > .ppt-compteur:first-child:not(.ppt-compteur-alerte) {
	background: var(--ppt-degrade) !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	border: none !important;
	color: #fff !important;
	box-shadow: 0 6px 18px rgba(29,158,58,0.28) !important;
}
.ppt-compteurs > .ppt-compteur:first-child:not(.ppt-compteur-alerte) strong { color: #fff !important; }
.ppt-compteur strong { font-size: 24px; display: inline-block; margin-right: 2px; }
.ppt-compteur-alerte { background: #fdecea; color: var(--ppt-rouge); }

/* Une visite / relance de la tournée : infos à gauche, action à droite. */
.ppt-visite {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-top: 1px solid var(--ppt-bord);
}
.ppt-visite:first-of-type { border-top: none; }
.ppt-visite-infos { min-width: 0; }               /* autorise la coupure du texte long */
.ppt-visite-infos strong { display: block; }
.ppt-visite-infos small { color: var(--ppt-gris); display: block; }
.ppt-visite-date {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	color: var(--ppt-vert);
	text-transform: capitalize;
}
.ppt-visite-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Une fiche client dans la liste. */
.ppt-client {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-top: 1px solid var(--ppt-bord);
}
.ppt-client:first-child { border-top: none; }
.ppt-client small { display: block; color: var(--ppt-gris); }

/* Badges de potentiel A/B/C (mêmes couleurs que l'admin). */
.ppt-badge {
	display: inline-block;
	min-width: 20px;
	text-align: center;
	padding: 1px 7px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	margin-left: 4px;
}
.ppt-badge-a { background: var(--ppt-vert); }
.ppt-badge-b { background: var(--ppt-orange); }
.ppt-badge-c { background: #8a8f98; }

/* ------------------------------------------------------------
 * BOUTONS
 * ------------------------------------------------------------ */
.ppt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;             /* la taille d'un pouce : ergonomie tactile */
	padding: 8px 16px;
	background: var(--ppt-degrade-btn);
	color: #fff !important;
	border: none;
	border-radius: 999px;         /* bouton « pilule » (design iOS) */
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(19, 88, 60, 0.28);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
	gap: 6px;
}
/* Icône SVG à l'intérieur d'un bouton texte : taille alignée sur
   le texte, prend la couleur du bouton (blanc, ou vert si secondaire). */
.ppt-btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.ppt-btn:active { transform: scale(0.97); box-shadow: 0 2px 8px rgba(19, 88, 60, 0.24); }
.ppt-btn-secondaire { background: var(--ppt-vert-pale); color: var(--ppt-vert-fonce) !important; box-shadow: none; }
.ppt-btn-large { width: 100%; margin-top: 14px; }
.ppt-carte h2 .ppt-btn { min-height: 34px; padding: 4px 12px; font-size: 13px; box-shadow: none; }

/* ------------------------------------------------------------
 * FORMULAIRES
 * ------------------------------------------------------------ */
.ppt-form label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: var(--ppt-gris);
	margin: 12px 0 4px;
}
.ppt-form input[type="text"],
.ppt-form input[type="tel"],
.ppt-form input[type="date"],
.ppt-form input[type="email"],
.ppt-form select,
.ppt-form textarea {
	width: 100%;
	font-size: 16px;              /* < 16px = zoom automatique sur iPhone */
	padding: 11px 12px;
	border: 1px solid var(--ppt-bord);
	border-radius: 10px;
	background: #fff;
	color: var(--ppt-encre);
	box-sizing: border-box;
}
.ppt-form :focus {
	outline: 2px solid var(--ppt-vert);
	outline-offset: 1px;
	border-color: var(--ppt-vert);
}

/* ── CONTOUR DE FOCUS : clavier seulement ────────────────────
   Sur les éléments qu'on ACTIONNE (boutons, liens, onglets de
   type <summary>, résumés dépliables…), le navigateur dessine
   par défaut un cadre au clic/tap — inutile et disgracieux au
   doigt (le fameux cadre blanc en nuit / noir en jour). On le
   retire au clic, mais on le GARDE, bien visible, pour ceux qui
   naviguent au clavier (accessibilité) via :focus-visible. */
.ppt-app a:focus,
.ppt-app button:focus,
.ppt-app summary:focus,
.ppt-app details:focus,
.ppt-app [role="button"]:focus,
.ppt-app .ppt-btn:focus,
.ppt-app .ppt-swipe-act:focus,
.ppt-app .ppt-swipe-chevron:focus,
.ppt-app .ppt-nav a:focus {
	outline: none;
}
.ppt-app a:focus-visible,
.ppt-app button:focus-visible,
.ppt-app summary:focus-visible,
.ppt-app [role="button"]:focus-visible,
.ppt-app .ppt-btn:focus-visible,
.ppt-app .ppt-nav a:focus-visible {
	outline: 2px solid var(--ppt-vert);
	outline-offset: 2px;
	border-radius: 6px;
}
.ppt-req { color: var(--ppt-rouge); }
.ppt-note {
	background: var(--ppt-fond);
	border-radius: 10px;
	padding: 8px 12px;
	font-size: 13px;
	color: var(--ppt-gris);
	margin: 12px 0 0;
}
.ppt-note-objectif {
	background: var(--ppt-vert-pale);
	color: var(--ppt-vert-fonce);
	border-left: 3px solid var(--ppt-vert);
}
.ppt-cases { display: flex; flex-wrap: wrap; gap: 8px; }
.ppt-case {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	margin: 0 !important;
	padding: 9px 12px;
	border: 1px solid var(--ppt-bord);
	border-radius: 10px;
	font-weight: 400 !important;
	font-size: 14px !important;
	color: var(--ppt-encre) !important;
	background: #fff;
}
/* :has() = "la case qui CONTIENT une checkbox cochée" : elle
   se colore en vert, comme une puce sélectionnée. */
.ppt-case:has(input:checked) {
	background: var(--ppt-vert-pale);
	border-color: var(--ppt-vert);
	color: var(--ppt-vert-fonce) !important;
}

/* Champ de recherche clients. */
.ppt-recherche {
	width: 100%;
	font-size: 16px;
	padding: 11px 12px;
	border: 1px solid var(--ppt-bord);
	border-radius: 10px;
	margin-bottom: 8px;
	box-sizing: border-box;
}

/* ------------------------------------------------------------
 * PROGRESSION, TABLEAUX, MESSAGES
 * ------------------------------------------------------------ */
.ppt-progression { margin-bottom: 12px; }
.ppt-progression-libelle {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	margin-bottom: 4px;
}
.ppt-barre {
	height: 12px;
	background: #e3e7e5;
	border-radius: 999px;
	overflow: hidden;
}
.ppt-barre-remplie {
	height: 100%;
	background: var(--ppt-orange);
	border-radius: 999px;
	transition: width .4s ease;
}
.ppt-barre-ok { background: var(--ppt-vert); }

.ppt-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ppt-table th {
	text-align: left;
	color: var(--ppt-gris);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .4px;
	padding: 4px 6px;
}
.ppt-table td { padding: 7px 6px; border-top: 1px solid var(--ppt-bord); }
.ppt-negatif { color: var(--ppt-rouge); }

/* Le "toast" de confirmation après enregistrement. */
.ppt-toast {
	background: var(--ppt-vert);
	color: #fff;
	border-radius: 12px;
	padding: 12px 16px;
	margin-bottom: 14px;
	font-weight: 600;
}

/* ------------------------------------------------------------
 * NAVIGATION DU BAS
 * ------------------------------------------------------------ */
.ppt-nav {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	display: flex;
	/* Chaque onglet prend une part ÉGALE de la largeur : la barre
	   s'adapte au nombre d'onglets (4, 5 ou 6) sans jamais déborder
	   ni couper le dernier. */
	justify-content: stretch;
	background: var(--ppt-carte);
	border-top: 1px solid var(--ppt-bord);
	/* env(safe-area-inset-bottom) = la zone de la barre d'accueil
	   des iPhone : on la respecte pour que rien ne soit masqué. */
	padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
	z-index: 999;
}
.ppt-nav-item {
	display: flex;
	flex: 1 1 0;              /* part égale, largeur minimale nulle */
	flex-direction: column;
	align-items: center;
	gap: 2px;
	font-size: 11px;
	color: var(--ppt-gris);
	text-decoration: none;
	min-width: 0;            /* autorise l'onglet à rétrécir */
	padding: 4px 2px;
	text-align: center;
	overflow: hidden;
}
/* Le libellé ne doit jamais casser la mise en page : il se
   réduit proprement si l'espace manque. */
.ppt-nav-item .ppt-nav-libelle {
	max-width: 100%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 10.5px;
}
.ppt-nav-icone { font-size: 20px; line-height: 1; }
.ppt-nav-actif { color: var(--ppt-vert); font-weight: 700; }

/* ------------------------------------------------------------
 * ÉCRAN DE CONNEXION
 * ------------------------------------------------------------ */
.ppt-connexion {
	background: var(--ppt-carte);
	border: 1px solid var(--ppt-bord);
	border-radius: 14px;
	padding: 28px 20px;
	margin: 48px 0;
	text-align: center;
}
.ppt-connexion p { color: var(--ppt-gris); }
/* On habille le formulaire natif de WordPress (wp_login_form). */
.ppt-connexion form { text-align: left; }
.ppt-connexion label { font-size: 13px; font-weight: 700; color: var(--ppt-gris); }
.ppt-connexion input[type="text"],
.ppt-connexion input[type="password"] {
	width: 100%;
	font-size: 16px;
	padding: 11px 12px;
	border: 1px solid var(--ppt-bord);
	border-radius: 10px;
	box-sizing: border-box;
}
.ppt-connexion input[type="submit"] {
	width: 100%;
	min-height: 46px;
	background: var(--ppt-vert);
	color: #fff;
	border: none;
	border-radius: 12px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

/* ============================================================
 * V2.1 — CORRECTIONS DU RETOUR DE TEST
 * ============================================================ */

/* --- Le placeholder des <select> coupé en bas (point 2 et 4) ---
   Cause : le thème impose aux select une hauteur fixe et une
   grande line-height, qui poussent le texte hors du cadre (le
   même problème rencontré sur ACTES29 Manager). Remède :
   1. appearance:none = on retire l'habillage natif/du thème
   2. height:auto + line-height normale, verrouillées (!important)
   3. on redessine la petite flèche nous-mêmes (image SVG). */
/* (Ancien bloc .ppt-app select neutralisé : le style select est
   désormais unifié avec les inputs plus bas — bloc iOS min-height
   44px, padding 11px 14px, radius 10px. On conserve seulement le
   style du select de la page de CONNEXION, hors .ppt-app.) */
.ppt-connexion select {
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
	min-height: 44px !important;
	line-height: 1.4 !important;
	padding: 11px 40px 11px 14px !important;
	background-color: #fff !important;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2361707d' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 13px center !important;
	background-size: 14px 9px !important;
	font-size: 16px !important;
	color: var(--ppt-encre) !important;
	border: 1px solid var(--ppt-bord) !important;
	border-radius: 10px !important;
	box-sizing: border-box !important;
	width: 100%;
}

/* Les listes à choix multiples (produits présentés) : pas de
   flèche, hauteur libre, options confortables au doigt. */
.ppt-app select[multiple] {
	background-image: none !important;
	padding: 6px !important;
	height: auto !important;
}
.ppt-app select[multiple] option {
	padding: 10px 8px;
	border-radius: 8px;
}
.ppt-app select[multiple] option:checked {
	background: var(--ppt-vert-pale);
	color: var(--ppt-vert-fonce);
	font-weight: 700;
}

/* Le mini-formulaire "nouveau client" dans la visite. */
.ppt-sous-bloc {
	background: var(--ppt-fond);
	border-radius: 12px;
	padding: 4px 12px 12px;
	margin-top: 8px;
}

/* Accordéon du stock (groupé par produit). */
.ppt-accordeon {
	border: 1px solid var(--ppt-bord);
	border-radius: 12px;
	margin-bottom: 8px;
	background: #fff;
}
.ppt-accordeon summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 14px;
	cursor: pointer;
	list-style: none;              /* retire le triangle par défaut */
}
/* Le nom prend toute la place disponible ; la quantité est calée à
   droite avec une largeur fixe, pour que les nombres s'alignent
   quelle que soit la longueur du nom du produit. */
.ppt-accordeon summary > strong {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding-right: 10px;
}
.ppt-accordeon summary > span {
	flex: 0 0 auto;
	width: 96px;
	text-align: right;
	white-space: nowrap;
}
.ppt-accordeon summary::-webkit-details-marker { display: none; }
.ppt-accordeon summary::after { content: "▾"; color: var(--ppt-gris); margin-left: 8px; }
.ppt-accordeon[open] summary::after { content: "▴"; }
.ppt-accordeon[open] summary { border-bottom: 1px solid var(--ppt-bord); }
.ppt-accordeon-corps { padding: 4px 14px 10px; }

/* ============================================================
 * V2.4 — PALETTE PERISCOPE PHARMA (le teal du logo) + LISIBILITÉ
 * ============================================================
 * Les variables redéfinies ici écrasent les valeurs d'origine :
 * un seul endroit pour changer toute l'identité visuelle. Les
 * deux verts viennent du logo officiel Périscope (extraits au
 * pixel) : vert foncé du périscope + vert vif de la croix.
 */
/* (Les variables de couleur historiques étaient redéfinies ici à
   l'identique — bloc retiré : la source unique est le premier bloc
   .ppt-app en haut du fichier, et le mode nuit plus bas.) */

/* --- Les lignes à deux niveaux (stock, ventes, activité) ---
   Ligne principale nette, détail secondaire en petit dessous,
   le tout séparé par de fins filets horizontaux. */
.ppt-stock-item {
	padding: 10px 0 8px;
	border-top: 1px solid var(--ppt-bord);
}
.ppt-stock-item:first-of-type { border-top: none; }
.ppt-stock-l1 {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
}
.ppt-stock-sub {
	display: block;
	color: var(--ppt-gris);
	font-size: 12.5px;
	margin-top: 2px;
}

/* Les formulaires en ligne (réception avec quantité, éclatés). */
.ppt-form-inline {
	display: flex;
	gap: 6px;
	align-items: center;
	margin-top: 8px;
	flex-wrap: wrap;
}
.ppt-form-inline select {
	flex: 1;
	min-width: 150px;
}
.ppt-qte {
	width: 74px !important;
	font-size: 16px !important;
	padding: 9px 8px !important;
	border: 1px solid var(--ppt-bord) !important;
	border-radius: 10px !important;
	text-align: center;
}

/* Les filtres compacts (finances direction, éclatés). */
.ppt-form-filtres {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.ppt-form-filtres label { margin: 0 !important; }
.ppt-form-filtres input[type="date"],
.ppt-form-filtres input[type="month"] { width: auto; flex: 1; }

/* Les mentions du superviseur côté terrain. */
.ppt-mention {
	display: block;
	background: var(--ppt-vert-pale);
	border-left: 3px solid var(--ppt-vert);
	padding: 5px 8px;
	margin-top: 5px;
	border-radius: 0 8px 8px 0;
	font-size: 12.5px;
	color: var(--ppt-vert-fonce);
}
.ppt-mention svg { width: 14px; height: 14px; vertical-align: -2px; flex: 0 0 auto; }
.ppt-bulle-icone svg { width: 15px; height: 15px; vertical-align: -2px; }

/* ============================================================
 * RESPONSIVE ORDINATEUR / GRANDE TABLETTE
 * ============================================================
 * Sur mobile : colonne unique (inchangé). Dès 900px (le DG et le
 * superviseur sur ordinateur), l'application s'élargit et les
 * cartes respirent — même code, mise en page adaptée.
 */
/* (Ancien palier 900px neutralisé : le responsive est désormais
   géré par les paliers 640px / 1024px de la refonte v3.2.) */

/* ============================================================
 * V2.6 — DESIGN "iOS" : transparence, hiérarchie, sémantique
 * ============================================================
 * Inspiré d'ACTES29 Manager : entête et navigation translucides
 * (backdrop-filter = flou du contenu qui passe derrière),
 * chiffres en emphase, couleurs qui PARLENT au premier regard :
 *   teal  = la marque, les actions
 *   vert  = objectif atteint, tout va bien
 *   ambre = attention, en attente
 *   rouge = alerte, rupture, retard
 */
.ppt-app {
	/* (Variables ambre/rouge retirées : définies dans la palette
	   unique en haut du fichier.) */
	font-feature-settings: "tnum"; /* chiffres alignés (tableaux) */
}

/* --- Entête translucide, collée en haut. --- */
.ppt-entete {
	position: sticky;
	top: 0;
	z-index: 40;
	background: rgba(243, 246, 245, 0.82) !important;
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	backdrop-filter: saturate(160%) blur(14px);
	border-bottom: 1px solid rgba(19, 88, 60, 0.08);
}
.ppt-entete-id { display: flex; align-items: center; gap: 10px; }
.ppt-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(19, 88, 60, 0.2);
}

/* --- Navigation translucide, style iOS. --- */
.ppt-nav {
	background: rgba(255, 255, 255, 0.78) !important;
	-webkit-backdrop-filter: saturate(160%) blur(16px);
	backdrop-filter: saturate(160%) blur(16px);
	border-top: 1px solid rgba(19, 88, 60, 0.08);
}

/* --- Le logo image de l'écran de connexion. --- */
.ppt-logo-img {
	max-width: 170px;
	height: auto;
	margin: 0 auto 14px;
	display: block;
}

/* --- Hiérarchie typographique : les chiffres d'abord. --- */
.ppt-compteur strong {
	font-size: 30px;
	letter-spacing: -0.5px;
	color: var(--ppt-vert-fonce);
}
.ppt-carte h2 { font-size: 17px; letter-spacing: -0.2px; }
.ppt-stock-l1 span { font-weight: 600; }
.ppt-stock-l1 strong { font-size: 15.5px; }

/* --- Les indicateurs du rapport (KPIs). --- */
.ppt-kpis {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}
.ppt-kpi {
	background: var(--ppt-vert-pale);
	border-radius: 14px;
	padding: 12px;
	text-align: center;
}
.ppt-kpi strong { display: block; font-size: 22px; color: var(--ppt-vert-fonce); }
.ppt-kpi span { font-size: 12px; color: var(--ppt-gris); }

/* --- Les toasts sémantiques. --- */
.ppt-toast-attention { background: var(--ppt-ambre-pale); color: var(--ppt-ambre); border-left: 4px solid var(--ppt-ambre); }
.ppt-toast-erreur { background: var(--ppt-rouge-pale); color: var(--ppt-rouge); border-left: 4px solid var(--ppt-rouge); }

/* --- La bulle des mentions non lues (tous les écrans). --- */
.ppt-bulle-mentions {
	display: block;
	margin: 10px 14px 0;
	padding: 12px 14px;
	background: var(--ppt-ambre-pale);
	color: var(--ppt-ambre);
	border: 1px solid rgba(199, 125, 10, 0.25);
	border-radius: 14px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	animation: ppt-pulse 2.4s infinite;
}
@keyframes ppt-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(199, 125, 10, 0.25); }
	50% { box-shadow: 0 0 0 6px rgba(199, 125, 10, 0); }
}

/* --- L'info de stock sous le grossiste (vente intelligente). --- */
.ppt-stock-info { color: var(--ppt-vert-fonce); font-weight: 600; font-size: 13.5px; margin: 6px 0 0; }
.ppt-stock-info-vide { color: var(--ppt-rouge); }

/* --- La boîte de dialogue 💬 (mention du superviseur). --- */
.ppt-dialogue { margin-top: 6px; }
.ppt-dialogue summary {
	list-style: none;
	cursor: pointer;
	display: inline-block;
	font-size: 17px;
	padding: 2px 8px;
	border-radius: 8px;
	background: var(--ppt-fond);
}
.ppt-dialogue summary::-webkit-details-marker { display: none; }
.ppt-dialogue[open] summary { background: var(--ppt-vert-pale); }

.ppt-raccourcis { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

/* ============================================================
 * RESPONSIVE VISIBLE : la grille deux colonnes sur ordinateur
 * ============================================================
 * Sur grand écran, les cartes se répartissent sur DEUX colonnes ;
 * entête, compteurs, bulles et navigation traversent toute la
 * largeur. Le même code, deux mises en page réellement distinctes.
 */
/* (Ancien palier 900px en grille 2 colonnes neutralisé : il
   déséquilibrait l'affichage. Remplacé par les paliers v3.2.) */

/* ============================================================
 * IMPRESSION DU TERRAIN (rapport du délégué, visites équipe)
 * ============================================================ */
@media print {
	.ppt-nav, .ppt-entete, .ppt-bulle-mentions, .ppt-toast,
	.ppt-hors-impression, .ppt-dialogue, .ppt-imprimer { display: none !important; }
	.ppt-app { display: block; max-width: 100%; padding: 0; background: #fff; }
	.ppt-carte { box-shadow: none; border: 1px solid #bbb; page-break-inside: avoid; margin: 8px 0; }
	.ppt-kpis { grid-template-columns: repeat(4, 1fr); }
	body { background: #fff !important; }
}

/* ============================================================
 * V2.7 — LIQUID GLASS (le design de l'ERP ACTES 29 Manager)
 * ============================================================
 * Le verre liquide d'iOS : fond en dégradé doux, cartes en
 * verre dépoli (blanc translucide + flou du contenu derrière +
 * fin liseré lumineux), boutons "pilule" en dégradé teal avec
 * ombre portée colorée, navigation flottante détachée du bord.
 */
body:has(.ppt-app) {
	background: linear-gradient(160deg, #EAF4F1 0%, #F4F7F6 45%, #E7EEF3 100%) fixed;
}
.ppt-app { background: transparent; }

/* --- Les cartes : du verre dépoli. --- */
.ppt-carte {
	background: rgba(255, 255, 255, 0.62) !important;
	-webkit-backdrop-filter: saturate(170%) blur(18px);
	backdrop-filter: saturate(170%) blur(18px);
	border: 1px solid rgba(255, 255, 255, 0.75);
	box-shadow: 0 8px 28px rgba(19, 88, 60, 0.10);
	border-radius: 20px !important;
}
.ppt-compteur {
	background: rgba(255, 255, 255, 0.55) !important;
	-webkit-backdrop-filter: saturate(170%) blur(16px);
	backdrop-filter: saturate(170%) blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.7);
	box-shadow: 0 6px 20px rgba(19, 88, 60, 0.08);
	border-radius: 18px !important;
}

/* --- Les boutons : des pilules en dégradé. --- */
/* (Les propriétés iOS de .ppt-btn et .ppt-btn:active ont été
   fusionnées dans la définition unique plus haut — bloc dupliqué
   retiré.) */
.ppt-btn-secondaire {
	background: rgba(78, 158, 143, 0.12) !important;
	color: var(--ppt-vert-fonce) !important;
	box-shadow: none;
}
.ppt-btn-mini { padding: 7px 14px !important; font-size: 13px !important; }

/* (Ancien bloc « champs translucides arrondis » de .ppt-form
   neutralisé : les champs suivent désormais le standard unique
   défini plus bas — fond plein, radius 10px, bordure séparateur.) */

/* --- La navigation : une barre flottante, détachée du bord. --- */
.ppt-nav {
	left: 0 !important;
	right: 0 !important;
	bottom: 10px !important;
	width: calc(100% - 24px) !important;
	max-width: 480px;
	margin: 0 auto !important;
	box-sizing: border-box !important;
	overflow: hidden !important;
	border-radius: 22px !important;
	border: 1px solid rgba(255, 255, 255, 0.7) !important;
	box-shadow: 0 10px 30px rgba(19, 88, 60, 0.18);
}

/* --- L'ONGLET ACTIF, impossible à manquer : une pilule teal. --- */
.ppt-nav a {
	flex: 1 1 0;          /* chaque onglet prend une part égale */
	min-width: 0;         /* et peut rétrécir : jamais de débordement */
	box-sizing: border-box;
	border-radius: 16px;
	transition: background 0.15s ease, color 0.15s ease;
	padding: 7px 4px;     /* padding horizontal réduit pour tenir à 5-6 onglets */
	overflow: hidden;
}
.ppt-nav a.ppt-nav-actif,
.ppt-nav a[aria-current="page"] {
	background: var(--ppt-degrade-btn) !important;
	color: #fff !important;
	box-shadow: 0 4px 12px rgba(78, 158, 143, 0.4);
}
.ppt-nav a.ppt-nav-actif small, .ppt-nav a.ppt-nav-actif span,
.ppt-nav a[aria-current="page"] small, .ppt-nav a[aria-current="page"] span { color: #fff !important; }

/* --- L'écran de connexion : une carte de verre centrée. --- */
.ppt-connexion {
	background: rgba(255, 255, 255, 0.65) !important;
	-webkit-backdrop-filter: saturate(170%) blur(20px);
	backdrop-filter: saturate(170%) blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.8);
	border-radius: 24px !important;
	box-shadow: 0 16px 48px rgba(19, 88, 60, 0.14);
}

/* --- Indicatif + numéro : la même ligne (comme l'ERP). --- */
.ppt-tel-groupe { display: flex; gap: 8px; }
.ppt-tel-groupe .ppt-indicatif { flex: 0 0 44%; }
.ppt-tel-groupe input { flex: 1; min-width: 0; }

/* --- Le mot de passe et son œil. --- */
.ppt-mdp-groupe { position: relative; }
.ppt-mdp-groupe input { width: 100%; padding-right: 46px !important; }
.ppt-oeil {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	font-size: 18px;
	cursor: pointer;
	padding: 6px;
}
.ppt-case-libre { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-size: 14px; }
.ppt-case-libre input { width: auto !important; }

/* --- Le profil. --- */
.ppt-avatar-vide {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--ppt-vert-pale);
	font-size: 20px;
	color: var(--ppt-vert-fonce);
}
.ppt-avatar-vide svg { width: 22px; height: 22px; }
.ppt-avatar-grand { width: 64px; height: 64px; }
.ppt-profil-tete { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.ppt-entete-id { text-decoration: none; color: inherit; }

/* ============================================================
 * V2.8 — profil, toasts éphémères, indicatifs compacts
 * ============================================================ */

/* « Changer la photo » : le texte EST le lien d'upload. */
.ppt-lien-photo {
	display: inline-block;
	color: var(--ppt-vert-fonce);
	font-weight: 700;
	cursor: pointer;
	text-decoration: underline;
	margin-bottom: 10px;
}
.ppt-cache { display: none !important; }

/* Le bouton rouge de déconnexion (écran profil). */
.ppt-btn-danger {
	background: linear-gradient(135deg, var(--ppt-rouge), #96281B) !important;
	box-shadow: 0 4px 14px rgba(192, 57, 43, 0.35);
	text-align: center;
	display: block;
}

/* L'indicatif compact (drapeau + code, comme l'ERP). */
.ppt-tel-groupe .ppt-indicatif { flex: 0 0 118px; }
.ppt-note { font-size: 12.5px; color: var(--ppt-gris); margin: 4px 0 10px; }

/* Les TOASTS ÉPHÉMÈRES — sobres, façon ERP ACTES29 Manager :
   une fine capsule sombre translucide, discrète, sans à-plats
   de couleur criards ; seul un mince liseré marque le ton. */
.ppt-toast {
	position: fixed;
	top: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 200;
	max-width: 88vw;
	background: rgba(28, 38, 36, 0.90) !important;
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	color: #F2F6F5 !important;
	font-size: 13px;
	font-weight: 500;
	padding: 9px 16px !important;
	border: none !important;
	border-left: 3px solid var(--ppt-vert) !important;
	border-radius: 12px !important;
	box-shadow: 0 6px 20px rgba(20, 28, 26, 0.28);
	animation: ppt-toast-entree 0.3s ease;
	display: flex;
	align-items: center;
	gap: 9px;
}
/* Pictogramme uniforme au début de chaque toast, selon son type.
   Injecté en CSS pour que TOUS les toasts aient la même icône, sans
   dépendre d'un ✓/✗ tapé dans le texte. Le type par défaut = succès. */
.ppt-toast::before {
	content: "";
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	/* Coche verte (succès). */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231D9E3A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E");
}
.ppt-toast-attention::before {
	/* Triangle d'alerte ambre. */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23C77D0A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5 22 20H2z'/%3E%3Cpath d='M12 10v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
}
.ppt-toast-erreur::before {
	/* Croix rouge dans un cercle. */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23c0392b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m9 9 6 6M15 9l-6 6'/%3E%3C/svg%3E");
}
.ppt-toast-attention { border-left-color: var(--ppt-ambre) !important; background: rgba(28, 38, 36, 0.90) !important; color: #F2F6F5 !important; }
.ppt-toast-erreur { border-left-color: var(--ppt-rouge) !important; background: rgba(28, 38, 36, 0.90) !important; color: #F2F6F5 !important; }
@keyframes ppt-toast-entree {
	from { opacity: 0; transform: translate(-50%, -16px); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}
.ppt-toast-sortie { opacity: 0; transition: opacity 0.45s ease, transform 0.45s ease; transform: translate(-50%, -16px); }

@media print { .ppt-lien-photo, .ppt-btn-danger { display: none !important; } }

/* Les états financiers du back-office rendus au terrain : un
   habillage minimal pour leurs cartes et tableaux "admin". */
.ppt-etats-admin .pp-carte {
	background: rgba(255, 255, 255, 0.62);
	-webkit-backdrop-filter: saturate(170%) blur(18px);
	backdrop-filter: saturate(170%) blur(18px);
	border: 1px solid rgba(255, 255, 255, 0.75);
	box-shadow: 0 8px 28px rgba(19, 88, 60, 0.10);
	border-radius: 20px;
	padding: 18px;
	margin: 14px;
}
.ppt-etats-admin h2 { font-size: 16px; margin: 0 0 10px; color: var(--ppt-vert-fonce); }
.ppt-etats-admin table { width: 100%; border-collapse: collapse; font-size: 13px; background: transparent; }
.ppt-etats-admin th, .ppt-etats-admin td { padding: 8px 6px; text-align: left; border-bottom: 1px solid rgba(19, 88, 60, 0.08); }
.ppt-etats-admin th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--ppt-gris); }
.ppt-etats-admin .pp-total-ligne { font-size: 14px; margin-top: 8px; }
.ppt-etats-admin .pp-progression { margin: 8px 0; }
.ppt-etats-admin details summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.ppt-etats-admin .button, .ppt-etats-admin form.pp-filtre-mois { display: none; } /* les contrôles admin restent au back-office */
@media (max-width: 700px) { .ppt-etats-admin { overflow-x: auto; } .ppt-etats-admin table { min-width: 520px; } }

/* ============================================================
 * V3.0 — IMPRESSION PDF PROFESSIONNELLE
 * ============================================================
 * Objectifs : (1) tout déplier (aucun "…" ni détail masqué),
 * (2) tableaux qui tiennent dans la page, (3) en-tête avec logo
 * et pied de page paginé. La bannière .ppt-print-entete est
 * masquée à l'écran et ne s'affiche qu'à l'impression.
 */
.ppt-print-entete { display: none; }

@media print {

	/* La page : marges + pied de page paginé (numéro de page). */
	@page {
		margin: 14mm 12mm 18mm;
	}

	body { background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

	/* On masque tout le mobilier d'écran. */
	.ppt-nav, .ppt-entete, .ppt-bulle-mentions, .ppt-toast,
	.ppt-hors-impression, .ppt-imprimer, .ppt-dialogue > summary,
	.ppt-form-filtres, .ppt-raccourcis { display: none !important; }

	/* La bannière d'en-tête, elle, APPARAÎT et se répète en haut. */
	.ppt-print-entete {
		display: flex !important;
		align-items: center;
		gap: 12px;
		border-bottom: 2px solid var(--ppt-vert-fonce);
		padding-bottom: 8px;
		margin-bottom: 14px;
	}
	.ppt-print-entete img { height: 46px; width: auto; }
	.ppt-print-entete strong { display: block; font-size: 15px; color: var(--ppt-vert-fonce); }
	.ppt-print-entete span { font-size: 11px; color: #666; }

	/* TOUT DÉPLIER : les toggles s'ouvrent, les détails s'affichent. */
	.ppt-details-visite[open] .ppt-details-corps,
	.ppt-details-visite .ppt-details-corps,
	details.ppt-details-visite > .ppt-details-corps { display: block !important; }
	.ppt-details-visite > summary { display: none !important; }
	details[open] > *, details > .ppt-details-corps { display: block !important; }

	.ppt-app {
		display: block !important;
		max-width: 100% !important;
		padding: 0 !important;
		margin: 0 !important;
		background: #fff !important;
	}

	/* Les cartes : sobres, sans ombre, sans coupure au milieu. */
	.ppt-carte {
		background: #fff !important;
		box-shadow: none !important;
		border: 1px solid #ccc !important;
		border-radius: 6px !important;
		padding: 12px !important;
		margin: 0 0 10px !important;
		page-break-inside: avoid;
		backdrop-filter: none !important;
		-webkit-backdrop-filter: none !important;
	}

	.ppt-carte h2 { font-size: 14px !important; color: var(--ppt-vert-fonce) !important; }

	/* LES TABLEAUX QUI DÉBORDENT : on force le passage à la ligne
	   et une taille réduite pour qu'ils tiennent dans la largeur. */
	.ppt-etats-admin table,
	table.pp-table, table.widefat {
		width: 100% !important;
		max-width: 100% !important;
		table-layout: fixed !important;
		border-collapse: collapse !important;
		font-size: 10px !important;
	}
	.ppt-etats-admin th, .ppt-etats-admin td,
	table.pp-table th, table.pp-table td {
		padding: 4px 5px !important;
		word-break: break-word !important;
		overflow-wrap: anywhere !important;
		white-space: normal !important;
	}

	/* Les items de liste : pas de coupure au milieu d'une visite. */
	.ppt-stock-item { page-break-inside: avoid; }

	/* Le détail des visites : bien lisible en impression. */
	.ppt-details-corps p { margin: 2px 0; font-size: 11px; }
}

/* La synthèse d'activité du rapport délégué. */
.ppt-sous-titre { font-size: 13px; color: var(--ppt-gris); margin: 14px 0 8px; text-transform: uppercase; letter-spacing: 0.4px; }
.ppt-synthese-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.ppt-synthese-item {
	background: var(--ppt-vert-pale);
	border-radius: 12px;
	padding: 10px 8px;
	text-align: center;
}
.ppt-synthese-item strong { display: block; font-size: 20px; color: var(--ppt-vert-fonce); }
.ppt-synthese-item span { font-size: 11px; color: var(--ppt-gris); }

/* Le toggle "Voir le détail" d'une visite. */
.ppt-details-visite { margin-top: 6px; }
.ppt-details-visite > summary {
	list-style: none;
	cursor: pointer;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ppt-vert-fonce);
	padding: 4px 0;
}
.ppt-details-visite > summary::-webkit-details-marker { display: none; }
.ppt-details-visite > summary::before { content: '▸ '; }
.ppt-details-visite[open] > summary::before { content: '▾ '; }
.ppt-details-corps { padding: 6px 0 2px; }
.ppt-details-corps p { margin: 3px 0; font-size: 12.5px; line-height: 1.4; }

/* La pagination des visites. */
.ppt-pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; justify-content: center; }
.ppt-page-lien {
	min-width: 34px;
	padding: 6px 10px;
	text-align: center;
	border-radius: 10px;
	background: rgba(78, 158, 143, 0.12);
	color: var(--ppt-vert-fonce);
	text-decoration: none;
	font-weight: 600;
	font-size: 13px;
}
.ppt-page-actif { background: var(--ppt-degrade-btn); color: #fff; }

/* L'écran Analyse terrain : neutraliser la mise en page "wrap"
   du back-office pour qu'elle tienne dans l'app mobile. */
.ppt-etats-admin .wrap { margin: 0; max-width: 100%; }
.ppt-etats-admin .pp-titre { font-size: 18px; padding: 0 14px; }
.ppt-etats-admin .notice { margin: 8px 14px; }
.ppt-etats-admin .pp-graph { max-width: 100%; overflow-x: auto; }
.ppt-etats-admin .button, .ppt-etats-admin .pp-filtre-mois { display: none; }
/* La synthèse IA reste visible et lisible sur mobile. */
.ppt-etats-admin .pp-synthese-ia { font-size: 13.5px; line-height: 1.5; }

/* ════════════════════════════════════════════════════════════
 * ▓▓▓  DESIGN SYSTEM iOS — REFONTE v3.1  ▓▓▓
 * ════════════════════════════════════════════════════════════
 * Cette section RÉ-ÉTABLIT une identité visuelle cohérente et
 * sobre, façon iOS : hiérarchie typographique nette, boutons
 * discrets, champs proportionnés, espacements réguliers. Placée
 * en fin de fichier, elle prime sur les styles historiques.
 * ──────────────────────────────────────────────────────────── */

.ppt-app {
	/* Palette resserrée : les deux verts du LOGO Périscope, des gris iOS. */
	--pp-teal: #1D9E3A;          /* vert vif du logo (croix, PHARMA) */
	--pp-teal-fonce: #13583C;    /* vert foncé du logo (périscope, texte) */
	--pp-teal-pale: #e4f4e9;
	--pp-degrade: linear-gradient(140deg, #13583C 0%, #1D9E3A 115%);
	--pp-encre: #1C1C1E;          /* label primaire iOS */
	--pp-encre-2: #3A3A3C;        /* label secondaire */
	--pp-gris: #8E8E93;           /* label tertiaire iOS */
	--pp-gris-clair: #C7C7CC;
	--pp-separateur: #E5E5EA;     /* separator iOS */
	--pp-fond: #F2F2F7;           /* systemGroupedBackground iOS */
	--pp-carte: #FFFFFF;
	--pp-rouge: #c0392b;          /* aligné sur --ppt-rouge (rouge brique unique) */
	--pp-orange: #C77D0A;         /* aligné sur --ppt-orange (ambre unique) */
	--pp-rayon: 14px;
	--pp-rayon-sm: 10px;

	background: var(--pp-fond) !important;
	color: var(--pp-encre) !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
	font-size: 16px;
	line-height: 1.4;
	padding-bottom: 92px;
}

/* ─── TYPOGRAPHIE : une vraie hiérarchie ─────────────────────
 * Titre de carte (h2) : sombre, dense, c'est la voix principale.
 * Sous-titre (h3) : gris, petit, capitales espacées.
 * Corps : encre secondaire. Métadonnées : gris tertiaire. */
.ppt-app h2,
.ppt-carte h2 {
	font-size: 17px !important;
	font-weight: 700 !important;
	letter-spacing: -0.2px;
	color: var(--pp-encre) !important;
	margin: 0 0 14px !important;
	line-height: 1.25;
}
.ppt-app h3,
.ppt-sous-titre {
	font-size: 12px !important;
	font-weight: 600 !important;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--pp-gris) !important;
	margin: 16px 0 8px !important;
}
.ppt-app p { color: var(--pp-encre-2); }
.ppt-note,
.ppt-app small,
.ppt-stock-sub { color: var(--pp-gris) !important; font-size: 13px !important; }

/* ─── CARTES : blanches, arrondies, ombre iOS discrète ─────── */
.ppt-app .ppt-carte {
	background: var(--pp-carte) !important;
	border: none !important;
	border-radius: var(--pp-rayon) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 1px rgba(0, 0, 0, 0.03) !important;
	padding: 16px !important;
	margin: 0 0 14px !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
}

/* ─── BOUTONS : sobres, compacts, jamais toute la largeur ──── */
.ppt-app .ppt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: auto;
	min-height: 40px;
	padding: 9px 18px !important;
	background: var(--pp-teal) !important;
	color: #fff !important;
	border: none !important;
	border-radius: var(--pp-rayon-sm) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;   /* fini le Title Case forcé */
	box-shadow: none !important;
	cursor: pointer;
	transition: opacity 0.15s ease, transform 0.1s ease;
}
.ppt-app .ppt-btn:active { opacity: 0.72; transform: scale(0.98); }

/* Bouton secondaire : teinté, discret. */
.ppt-app .ppt-btn-secondaire {
	background: var(--pp-teal-pale) !important;
	color: var(--pp-teal-fonce) !important;
}
/* Bouton mini : pour les entêtes de carte et les filtres. */
.ppt-app .ppt-btn-mini {
	min-height: 36px;
	padding: 6px 14px !important;
	font-size: 13px !important;
}
/* Bouton pleine largeur : réservé aux actions majeures (submit). */
.ppt-app .ppt-btn-large {
	width: 100% !important;
	min-height: 48px;
	font-size: 16px !important;
	margin-top: 8px;
}
.ppt-app .ppt-btn-danger { background: var(--pp-rouge) !important; color: #fff !important; }

/* Les boutons dans un titre de carte : alignés à droite, petits. */
.ppt-app .ppt-carte h2 .ppt-btn { margin-left: auto; }

/* ─── CHAMPS DE SAISIE : proportionnés, bordure fine iOS ───── */
.ppt-app input[type="text"],
.ppt-app input[type="tel"],
.ppt-app input[type="email"],
.ppt-app input[type="password"],
.ppt-app input[type="number"],
.ppt-app input[type="date"],
.ppt-app input[type="month"],
.ppt-app input[type="search"],
.ppt-app select,
.ppt-app textarea {
	width: 100%;
	box-sizing: border-box;
	min-height: 44px;
	padding: 11px 14px !important;
	background: var(--pp-carte) !important;
	border: 1px solid var(--pp-separateur) !important;
	border-radius: var(--pp-rayon-sm) !important;
	font-size: 16px !important;      /* 16px = pas de zoom auto iOS */
	color: var(--pp-encre) !important;
	line-height: 1.3;
	-webkit-appearance: none;
	appearance: none;
}
.ppt-app textarea { min-height: 90px; resize: vertical; }
.ppt-app select {
	/* La petite flèche iOS. */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238E8E93' d='M6 8L0 2l1.4-1.4L6 5.2 10.6.6 12 2z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 36px !important;
}
.ppt-app input:focus,
.ppt-app select:focus,
.ppt-app textarea:focus {
	outline: none;
	border-color: var(--pp-teal) !important;
	box-shadow: 0 0 0 3px rgba(29, 158, 58, 0.12) !important;
}
.ppt-app label {
	display: block;
	font-size: 13px !important;
	font-weight: 600;
	color: var(--pp-encre-2) !important;
	margin: 14px 0 6px !important;
}
.ppt-app label:first-child { margin-top: 0 !important; }

/* ─── FORMULAIRES DE FILTRES : compacts, alignés, pas géants ── */
.ppt-app .ppt-form-filtres {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}
.ppt-app .ppt-form-filtres label {
	margin: 0 !important;
	font-size: 12px !important;
	color: var(--pp-gris) !important;
}
.ppt-app .ppt-form-filtres input,
.ppt-app .ppt-form-filtres select {
	width: auto;
	min-height: 38px;
	flex: 1 1 auto;
	min-width: 120px;
}
.ppt-app .ppt-form-filtres .ppt-btn { flex: 0 0 auto; }

/* ─── NAVIGATION BASSE : barre iOS translucide ─────────────── */
.ppt-app .ppt-nav,
.ppt-nav {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	display: flex;
	justify-content: space-around;
	align-items: stretch;
	max-width: 480px;
	margin: 0 auto;
	padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
	background: rgba(255, 255, 255, 0.86);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	backdrop-filter: saturate(180%) blur(20px);
	border-top: 0.5px solid var(--pp-separateur);
	box-shadow: none;
	z-index: 100;
}
.ppt-nav-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	flex: 1;
	padding: 4px 2px;
	font-size: 10px !important;
	font-weight: 500;
	color: var(--pp-gris) !important;
	text-decoration: none;
	border-radius: 8px;
	transition: color 0.15s ease;
}
.ppt-nav-icone { font-size: 22px; line-height: 1; }
/* Les icônes SVG de la barre de navigation : taille fixe, couleur
   héritée du texte de l'onglet (donc grise au repos, verte quand
   l'onglet est actif — via currentColor). */
.ppt-nav-icone svg {
	display: block;
	width: 24px;
	height: 24px;
	color: inherit;
}
.ppt-nav-actif { color: var(--pp-teal) !important; }
.ppt-nav-actif .ppt-nav-icone { transform: none; }

/* ─── ENTÊTE : titre app + avatar, épuré ───────────────────── */
.ppt-app .ppt-entete {
	padding: 12px 4px 8px;
	border-bottom: none;
}

/* ─── KPIs : grille de tuiles iOS ──────────────────────────── */
.ppt-app .ppt-kpis {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}
.ppt-app .ppt-kpi {
	background: var(--pp-teal-pale);
	border-radius: var(--pp-rayon-sm);
	padding: 14px 12px;
	text-align: center;
}
.ppt-app .ppt-kpi strong {
	display: block;
	font-size: 24px;
	font-weight: 700;
	color: var(--pp-teal-fonce);
	letter-spacing: -0.5px;
}
.ppt-app .ppt-kpi span { font-size: 11px; color: var(--pp-gris); }

/* ─── LIGNES DE LISTE : séparateurs fins iOS ───────────────── */
.ppt-app .ppt-stock-item,
.ppt-app .ppt-client {
	padding: 12px 0 !important;
	border-bottom: 0.5px solid var(--pp-separateur) !important;
	border-top: none !important;
}
.ppt-app .ppt-stock-item:last-child,
.ppt-app .ppt-client:last-child { border-bottom: none !important; }
.ppt-app .ppt-stock-l1 {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	font-size: 15px;
	font-weight: 600;
	color: var(--pp-encre);
}

/* ─── BADGES DE POTENTIEL : pastilles iOS ──────────────────── */
.ppt-app .ppt-badge {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	margin-left: 6px;
}
.ppt-app .ppt-badge-a { background: rgba(52,199,89,0.15); color: #248A3D; }
.ppt-app .ppt-badge-b { background: rgba(255,149,0,0.15); color: #C93400; }
.ppt-app .ppt-badge-c { background: rgba(142,142,147,0.15); color: #6C6C70; }

/* ─── TOASTS : capsule iOS sombre, centrée ─────────────────── */
.ppt-app .ppt-toast {
	background: rgba(30, 30, 32, 0.92) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 14px !important;
	padding: 12px 18px !important;
	font-size: 14px !important;
	font-weight: 500;
}

/* ─── ÉTAT DE CHARGEMENT AJAX : voile léger ────────────────── */
.ppt-contenu { transition: opacity 0.15s ease; }
.ppt-contenu.ppt-chargement { opacity: 0.5; pointer-events: none; }

/* ─── RACCOURCIS (périodes) : puces horizontales ───────────── */
.ppt-app .ppt-raccourcis { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* ─── TABLEAUX : jamais de débordement, scroll interne ─────── */
.ppt-app table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	display: block;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	white-space: nowrap;
}
.ppt-app .ppt-etats-admin table th,
.ppt-app table th {
	font-size: 11px !important;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: var(--pp-gris) !important;
	font-weight: 600;
	text-align: left;
	padding: 8px 10px !important;
	border-bottom: 1px solid var(--pp-separateur) !important;
}
.ppt-app table td {
	padding: 10px !important;
	border-bottom: 0.5px solid var(--pp-separateur) !important;
	color: var(--pp-encre-2);
}

/* ─── SYNTHÈSE D'IMPRESSION (stock et autres) ──────────────── */
.ppt-impression-seule { display: none; }   /* masquée à l'écran */

@media print {
	/* À l'impression : on inverse — l'accordéon disparaît, la
	   synthèse tabulaire apparaît. */
	.ppt-hors-impression-bloc { display: none !important; }
	.ppt-impression-seule { display: block !important; }

	.ppt-tableau-synthese {
		width: 100% !important;
		border-collapse: collapse !important;
		display: table !important;       /* on annule le scroll interne */
		white-space: normal !important;
		font-size: 11px !important;
	}
	.ppt-tableau-synthese th {
		background: #F0F5F3 !important;
		text-align: left;
		padding: 6px 8px !important;
		border: 1px solid #ccc !important;
		font-size: 10px !important;
		text-transform: uppercase;
		color: var(--ppt-vert-fonce) !important;
	}
	.ppt-tableau-synthese td {
		padding: 5px 8px !important;
		border: 1px solid #ddd !important;
	}
	.ppt-ligne-sous-total td { background: #F7FAF9 !important; }
	.ppt-ligne-total td { background: #e4f4e9 !important; font-size: 12px !important; }
	.ppt-tableau-synthese td:nth-child(3),
	.ppt-tableau-synthese td:nth-child(4),
	.ppt-tableau-synthese th:nth-child(3),
	.ppt-tableau-synthese th:nth-child(4) { text-align: right; }
}

/* ════════════════════════════════════════════════════════════
 * ▓▓▓  HARMONISATION + RESPONSIVE + MODE NUIT — v3.2  ▓▓▓
 * ════════════════════════════════════════════════════════════ */

/* ─── 1. HARMONISATION DES CHAMPS ET GROUPES ────────────────
 * Tous les contrôles d'un même groupe partagent EXACTEMENT la
 * même hauteur (44px) et le même style ; les libellés inline
 * sont alignés verticalement au centre. */
.ppt-app .ppt-form-filtres {
	align-items: center;
	gap: 8px 10px;
}
.ppt-app .ppt-form-filtres > label {
	align-self: center;
	line-height: 44px;         /* aligné sur la hauteur des champs */
	flex: 0 0 auto;
	white-space: nowrap;
}
/* Les champs de filtre : hauteur unique, largeur raisonnable,
   texte centré verticalement, jamais démesurés. */
.ppt-app .ppt-form-filtres input,
.ppt-app .ppt-form-filtres select,
.ppt-app .ppt-form-filtres .ppt-btn {
	height: 44px;
	min-height: 44px;
	box-sizing: border-box;
	flex: 1 1 140px;
	max-width: 100%;
	margin: 0;
}
.ppt-app .ppt-form-filtres .ppt-btn {
	flex: 0 0 auto;
	min-width: 96px;
}
/* Le contenu des date/month centré (fini le "juillet 2026" collé en haut). */
.ppt-app input[type="date"],
.ppt-app input[type="month"] {
	line-height: normal;
	display: flex;
	align-items: center;
}

/* Groupe téléphone (indicatif + numéro) : hauteurs identiques. */
.ppt-app .ppt-tel-groupe {
	display: flex;
	gap: 8px;
	align-items: stretch;
}
.ppt-app .ppt-tel-groupe .ppt-indicatif {
	flex: 0 0 120px;
	height: 44px;
}
.ppt-app .ppt-tel-groupe input {
	flex: 1 1 auto;
	height: 44px;
}

/* Formulaire inline (rattacher officine : select + quantité + OK) :
   une seule ligne, alignée, hauteurs égales — image 4 corrigée. */
.ppt-app .ppt-form-inline {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: stretch;
	margin-top: 10px;
}
.ppt-app .ppt-form-inline select {
	flex: 1 1 160px;
	height: 44px;
}
.ppt-app .ppt-form-inline .ppt-qte {
	flex: 0 0 68px;
	width: 68px;
	height: 44px;
	text-align: center;
	padding: 0 8px !important;
}
.ppt-app .ppt-form-inline .ppt-btn {
	flex: 0 0 auto;
	height: 44px;
	min-width: 60px;
}

/* Les boutons Réinitialiser / CSV / imprimer sur une ligne cohérente. */
.ppt-app .ppt-form-filtres .ppt-btn-secondaire { min-width: auto; }

/* ─── 2. RESPONSIVE : mobile / tablette / PC ────────────────
 * L'app est conçue mobile d'abord (≤480px). Au-delà, on élargit
 * le conteneur et on passe certaines grilles en multi-colonnes. */

/* Tablette (≥ 640px) : conteneur plus large, KPIs sur 4 colonnes. */
@media (min-width: 640px) {
	.ppt-app {
		max-width: 680px;
		padding-left: 20px;
		padding-right: 20px;
	}
	.ppt-app .ppt-kpis { grid-template-columns: repeat(4, 1fr); }
	.ppt-app .ppt-nav { max-width: 680px; width: calc(100% - 40px); }
	/* Les cartes gagnent en respiration. */
	.ppt-app .ppt-carte { padding: 20px !important; }
}

/* PC / grand écran (≥ 1024px) : mise en page centrée et large,
   la navigation basse devient une barre plus contenue. */
@media (min-width: 1024px) {
	.ppt-app {
		max-width: 920px;
		padding-bottom: 40px;
	}
	/* Sur PC, la navigation reste en bas mais centrée et arrondie. */
	.ppt-app .ppt-nav,
	.ppt-nav {
		max-width: 920px;
		border-radius: 18px 18px 0 0;
	}
	/* Deux colonnes pour les écrans riches en cartes. */
	.ppt-app .ppt-synthese-grille { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* ─── 3. TABLEAUX : plus jamais de débordement (image 7) ────
 * Enveloppe scrollable : le tableau garde sa largeur mais glisse
 * horizontalement dans sa carte au lieu de pousser la page. */
.ppt-app .ppt-etats-admin,
.ppt-app .ppt-carte > table,
.ppt-app .pp-graph {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.ppt-app .ppt-etats-admin table {
	min-width: 0;
	width: 100%;
	font-size: 13px;
}
/* Les cellules ne forcent plus une largeur énorme. */
.ppt-app .ppt-etats-admin th,
.ppt-app .ppt-etats-admin td {
	white-space: nowrap;
	padding: 8px 10px !important;
}
/* Les légendes (.description) : discrètes, jamais en gros corps
   de texte — corrige l'image 6. */
.ppt-app .description,
.ppt-etats-admin .description {
	font-size: 12px !important;
	color: var(--pp-gris) !important;
	line-height: 1.4;
	display: block;
	margin-top: 6px;
}
/* Les titres du module Analyses réutilisé : au gabarit terrain. */
.ppt-app .ppt-etats-admin .pp-titre { font-size: 20px !important; font-weight: 700; }
.ppt-app .ppt-etats-admin h2 { font-size: 16px !important; }

/* ─── 4. MODE NUIT ──────────────────────────────────────────
 * Activé par la classe .ppt-nuit sur <html> (posée par le JS,
 * qui respecte le choix mémorisé ou la préférence système). Les
 * variables sont redéfinies : tout le reste suit automatiquement
 * puisque l'interface est bâtie sur ces variables. */
html.ppt-nuit .ppt-app {
	/* Vert de marque unifié en mode nuit : #4cc264 (vert doux,
	   choisi pour le confort sur fond sombre). Les deux systèmes de
	   variables (--pp-teal et --ppt-vert) pointent désormais sur le
	   même vert, pour supprimer le « double vert » d'avant. */
	--pp-teal: #4cc264;
	--pp-teal-fonce: #4cc264;
	--pp-teal-pale: #1E2C2A;
	--pp-encre: #F2F2F7;
	--pp-encre-2: #C7C7CC;
	--pp-gris: #8E8E93;
	/* IMPORTANT : les variables préfixées --ppt- (double p-t) servaient
	   plusieurs composants (mini-formulaire « nouveau client » du
	   formulaire de visite via .ppt-sous-bloc, etc.) mais n'avaient PAS
	   de version nuit → elles restaient claires (fond blanc) en mode
	   sombre. On les redéfinit ici pour le thème nuit. */
	--ppt-fond: #1C1C1E;
	--ppt-carte: #1C1C1E;
	--ppt-bord: #38383A;
	--ppt-encre: #F2F2F7;
	--ppt-gris: #8E8E93;
	/* Les verts historiques suivent maintenant le vert nuit unifié
	   (avant : ils restaient au vert vif clair #1D9E3A, d'où le
	   double vert visible en mode sombre). */
	--ppt-vert: #4cc264;
	--pp-vert-vif: #4cc264;
	--ppt-vert-fonce: #4cc264;
	--ppt-vert-fonce-2: #3DA592;
	--ppt-vert-pale: #1E2C2A;
	/* Les dégradés suivent aussi le vert doux en nuit, sinon les
	   cartes/boutons à dégradé restaient au vert vif #1D9E3A et
	   paraissaient plus foncés que les éléments plats (double vert). */
	--ppt-degrade: linear-gradient(140deg, #13583C 0%, #4cc264 120%);
	--ppt-degrade-btn: linear-gradient(135deg, #4cc264, #13583C);
	--pp-degrade: linear-gradient(140deg, #13583C 0%, #4cc264 120%);
	--pp-gris-clair: #48484A;
	--pp-separateur: #38383A;
	--pp-fond: #000000;          /* noir profond iOS */
	--pp-carte: #1C1C1E;         /* systemGray6 dark */
	/* Rouge et orange en nuit : mêmes teintes que le jour, juste
	   éclaircies pour rester lisibles sur fond sombre. Les deux
	   systèmes (--pp- et --ppt-) pointent sur les mêmes valeurs. */
	--pp-rouge: #e0574a;
	--pp-orange: #d9971f;
	--ppt-rouge: #e0574a;
	--ppt-orange: #d9971f;
	--ppt-ambre: #d9971f;
}
html.ppt-nuit .ppt-app { background: var(--pp-fond) !important; color: var(--pp-encre) !important; }

/* La barre de navigation sombre translucide. */
html.ppt-nuit .ppt-app .ppt-nav,
html.ppt-nuit .ppt-nav {
	background: rgba(28, 28, 30, 0.86);
	border-top-color: var(--pp-separateur);
}

/* Les champs en sombre. */
html.ppt-nuit .ppt-app input,
html.ppt-nuit .ppt-app select,
html.ppt-nuit .ppt-app textarea {
	background: #2C2C2E !important;
	border-color: var(--pp-separateur) !important;
	color: var(--pp-encre) !important;
}
html.ppt-nuit .ppt-app .ppt-btn-secondaire {
	background: var(--pp-teal-pale) !important;
	color: var(--pp-teal-fonce) !important;
}
/* La flèche des selects en clair sur fond sombre. */
html.ppt-nuit .ppt-app select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238E8E93' d='M6 8L0 2l1.4-1.4L6 5.2 10.6.6 12 2z'/%3E%3C/svg%3E");
}

/* Le module Analyses réutilisé (fond blanc admin) en sombre. */
html.ppt-nuit .ppt-app .ppt-etats-admin .pp-carte,
html.ppt-nuit .ppt-app .ppt-etats-admin .wrap {
	background: var(--pp-carte) !important;
	color: var(--pp-encre) !important;
}
html.ppt-nuit .ppt-app .ppt-etats-admin table td { color: var(--pp-encre-2) !important; }

/* L'entête (avatar, titre). */
html.ppt-nuit .ppt-app .ppt-entete { color: var(--pp-encre); }

/* Le bouton bascule jour/nuit. */
.ppt-bascule-nuit {
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	padding: 6px;
	line-height: 1;
	border-radius: 50%;
}
.ppt-bascule-nuit:active { opacity: 0.6; }

/* Confort de lecture : les images de logo restent visibles. */
html.ppt-nuit .ppt-logo-img { filter: brightness(1.05); }

/* ─── 5. GARDE-FOU ANTI-DÉBORDEMENT (renforcé) ──────────────
 * En contexte terrain, AUCUN tableau ne doit pousser la page.
 * On force l'enveloppe scrollable au niveau de la carte ET du
 * tableau, quel que soit le module (y compris Analyses réutilisé). */
.ppt-app .ppt-carte { overflow: hidden; }        /* la carte ne s'étire pas */
.ppt-app .ppt-etats-admin .pp-carte,
.ppt-app .ppt-etats-admin > .wrap { overflow-x: hidden; }
.ppt-app .ppt-etats-admin table,
.ppt-app .ppt-carte table {
	display: block;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
	white-space: nowrap;
}
/* Le graphique de tendance (barres) ne dépasse pas non plus. */
.ppt-app .pp-graph { max-width: 100%; overflow-x: auto; }
/* Sécurité ultime : rien dans l'app ne crée de scroll horizontal global. */
.ppt-app { overflow-x: hidden; }

/* ─── Entête : avatar à gauche, bascule nuit à droite ─────── */
.ppt-app .ppt-entete {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.ppt-app .ppt-entete-id { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; }
.ppt-app .ppt-entete-id .ppt-logo { font-size: 16px; font-weight: 700; color: var(--pp-encre); display: block; }
.ppt-app .ppt-bascule-nuit { flex: 0 0 auto; color: var(--pp-encre-2); }

/* ════════════════════════════════════════════════════════════
 * ▓▓▓  MODE NUIT — SURCOUCHE EXHAUSTIVE v3.4  ▓▓▓
 * ════════════════════════════════════════════════════════════
 * Beaucoup d'éléments historiques ont un fond blanc/gris codé en
 * dur qui échappait au mode nuit (compteurs, accordéons, stock,
 * cartes…). Cette surcouche les rattache tous au thème sombre. */

html.ppt-nuit .ppt-app,
html.ppt-nuit .ppt-contenu { background: #000 !important; color: #F2F2F7 !important; }

/* Toutes les cartes et surfaces "boîte" → gris sombre iOS. */
html.ppt-nuit .ppt-app .ppt-carte,
html.ppt-nuit .ppt-app .ppt-compteur,
html.ppt-nuit .ppt-app .ppt-accordeon,
html.ppt-nuit .ppt-app .ppt-kpi,
html.ppt-nuit .ppt-app .ppt-synthese-item,
html.ppt-nuit .ppt-app .ppt-client,
html.ppt-nuit .ppt-app .ppt-stock-item,
html.ppt-nuit .ppt-app details,
html.ppt-nuit .ppt-app .ppt-connexion {
	background: #1C1C1E !important;
	border-color: #38383A !important;
	color: #F2F2F7 !important;
}

/* Le compteur signature garde son dégradé en nuit (un peu assombri). */
html.ppt-nuit .ppt-app .ppt-compteurs > .ppt-compteur:first-child:not(.ppt-compteur-alerte) {
	background: linear-gradient(140deg, #0f4a32 0%, #4cc264 130%) !important;
	border-color: transparent !important;
	color: #fff !important;
}

/* Les tuiles teintées (KPI, compteurs, synthèse) → vert sombre. */
html.ppt-nuit .ppt-app .ppt-kpi,
html.ppt-nuit .ppt-app .ppt-synthese-item {
	background: #1E2C2A !important;
}

/* Les accordéons de stock : entête + corps sombres. */
html.ppt-nuit .ppt-app .ppt-accordeon summary,
html.ppt-nuit .ppt-app .ppt-accordeon-corps { background: #1C1C1E !important; color: #F2F2F7 !important; }
html.ppt-nuit .ppt-app .ppt-accordeon[open] summary { border-bottom-color: #38383A !important; }

/* Les lignes de stock/liste internes. */
html.ppt-nuit .ppt-app .ppt-stock-ligne,
html.ppt-nuit .ppt-app .ppt-stock-l1 { color: #F2F2F7 !important; }

/* Tous les titres et textes forts → clairs. */
html.ppt-nuit .ppt-app h1,
html.ppt-nuit .ppt-app h2,
html.ppt-nuit .ppt-app h3,
html.ppt-nuit .ppt-app strong,
html.ppt-nuit .ppt-app .ppt-logo,
html.ppt-nuit .ppt-app .ppt-stock-l1 span { color: #F2F2F7 !important; }

/* Les textes secondaires → gris clair lisible. */
html.ppt-nuit .ppt-app p,
html.ppt-nuit .ppt-app small,
html.ppt-nuit .ppt-app .ppt-note,
html.ppt-nuit .ppt-app .ppt-stock-sub,
html.ppt-nuit .ppt-app .description,
html.ppt-nuit .ppt-app label,
html.ppt-nuit .ppt-app .ppt-user { color: #AEAEB2 !important; }

/* Les barres de progression (objectifs) → piste sombre. */
html.ppt-nuit .ppt-app .ppt-barre,
html.ppt-nuit .ppt-app .ppt-progress,
html.ppt-nuit .ppt-app progress { background: #2C2C2E !important; }

/* Le module Analyses réutilisé (fond blanc admin) → sombre. */
html.ppt-nuit .ppt-app .ppt-etats-admin,
html.ppt-nuit .ppt-app .ppt-etats-admin .pp-carte,
html.ppt-nuit .ppt-app .ppt-etats-admin .wrap {
	background: #1C1C1E !important;
	color: #F2F2F7 !important;
}
html.ppt-nuit .ppt-app .ppt-etats-admin table th { color: #AEAEB2 !important; border-color: #38383A !important; }
html.ppt-nuit .ppt-app .ppt-etats-admin table td { color: #E5E5EA !important; border-color: #38383A !important; }

/* L'entête (barre du haut) reste sombre — déjà le cas, on renforce. */
html.ppt-nuit .ppt-app .ppt-entete { background: transparent !important; }

/* Les badges de potentiel restent lisibles. */
html.ppt-nuit .ppt-app .ppt-badge-a { background: rgba(52,199,89,0.22); color: #6FE39A; }
html.ppt-nuit .ppt-app .ppt-badge-b { background: rgba(255,159,10,0.22); color: #FFC15E; }
html.ppt-nuit .ppt-app .ppt-badge-c { background: rgba(142,142,147,0.25); color: #C7C7CC; }

/* Le compteur d'alerte garde son rouge, adapté. */
html.ppt-nuit .ppt-app .ppt-compteur-alerte { background: #3A1A18 !important; color: #FF6961 !important; }

/* ════════════════════════════════════════════════════════════
 * ▓▓▓  HIÉRARCHIE TITRE / CONTENU RENFORCÉE v3.4  ▓▓▓
 * ════════════════════════════════════════════════════════════
 * Objectif : qu'on distingue IMMÉDIATEMENT le titre d'une section
 * de son contenu. Titres plus gros/sombres, en-têtes de tableau
 * nettement plus discrets, respiration accrue. */

/* Le titre de carte : la voix forte, avec un léger trait dessous. */
.ppt-app .ppt-carte > h2 {
	font-size: 18px !important;
	font-weight: 700 !important;
	color: var(--pp-encre) !important;
	letter-spacing: -0.3px;
	margin: 0 0 4px !important;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--pp-separateur);
	line-height: 1.3;
}
/* Un peu d'air entre le titre et le contenu qui suit. */
.ppt-app .ppt-carte > h2 + * { margin-top: 14px !important; }

/* Les sous-titres de section : petits, gris, espacés — clairement
   SECONDAIRES par rapport au titre de carte. */
.ppt-app .ppt-sous-titre,
.ppt-app h3 {
	font-size: 11px !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: var(--pp-gris) !important;
	margin: 18px 0 8px !important;
}

/* Les EN-TÊTES DE TABLEAU : discrets, jamais confondus avec un titre. */
.ppt-app table th,
.ppt-app .ppt-etats-admin table th {
	font-size: 10.5px !important;
	font-weight: 600 !important;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--pp-gris) !important;
	background: transparent !important;
	padding: 6px 10px !important;
}
/* Le contenu des cellules : lisible, encre normale. */
.ppt-app table td {
	font-size: 14px !important;
	color: var(--pp-encre) !important;
}
/* Le nom de produit en gras dans les tableaux : mis en avant. */
.ppt-app table td strong,
.ppt-app table td:first-child { font-weight: 600; }

/* Les lignes de sous-total / total : contrastées. */
.ppt-app .ppt-ligne-sous-total td,
.ppt-app tr.ppt-total td { font-weight: 700; }

/* Suppression des ombres/effets superflus sur les KPI (plus sobre). */
.ppt-app .ppt-kpi { box-shadow: none; }

/* ─── Graphique SVG de tendance (onglet Analyse) ──────────── */
.ppt-app .pp-graph-svg,
.pp-graph-svg {
	width: 100%;
	max-width: 100%;
	margin: 8px 0 16px;
	overflow: hidden;
}
.pp-graph-svg svg { width: 100%; height: auto; display: block; }
/* Mode nuit : repères et textes adaptés. */
html.ppt-nuit .pp-graph-svg line { stroke: #38383A !important; }
html.ppt-nuit .pp-graph-svg text { fill: #AEAEB2 !important; }
html.ppt-nuit .pp-graph-svg circle { fill: #1C1C1E !important; }

/* ─── Pagination : Précédent / Suivant + numéros ──────────── */
.ppt-app .ppt-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	flex-wrap: wrap;
	margin: 12px 0;
	padding: 4px 0;
}
.ppt-app .ppt-page-nav {
	padding: 7px 12px;
	border-radius: 9px;
	background: var(--pp-teal-pale);
	color: var(--pp-teal-fonce);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.ppt-app .ppt-page-inactif { opacity: 0.35; pointer-events: none; }
.ppt-app .ppt-page-lien {
	min-width: 34px;
	padding: 7px 10px;
	text-align: center;
	border-radius: 9px;
	background: transparent;
	color: var(--pp-encre-2);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}
.ppt-app .ppt-page-actif { background: var(--pp-teal); color: #fff !important; }
.ppt-app .ppt-page-ellipse { color: var(--pp-gris); padding: 0 2px; }

html.ppt-nuit .ppt-app .ppt-page-nav { background: #1E2C2A !important; color: #4cc264 !important; }
html.ppt-nuit .ppt-app .ppt-page-lien { color: #C7C7CC !important; }
html.ppt-nuit .ppt-app .ppt-page-actif { background: #4cc264 !important; color: #fff !important; }

/* ─── L'ŒIL afficher/masquer le mot de passe ───────────────
 * Il était fondu dans le champ (même teinte). On lui donne un
 * contraste net, en mode jour comme en mode nuit. */
.ppt-app .ppt-mdp-groupe { position: relative; display: block; }
.ppt-app .ppt-mdp-groupe input { width: 100%; padding-right: 48px !important; }
.ppt-app .ppt-oeil {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent !important;
	border: none !important;
	padding: 8px !important;
	min-height: 0 !important;
	line-height: 0;
	cursor: pointer;
	color: #6E6E73 !important;         /* gris franc sur fond clair */
	box-shadow: none !important;
	z-index: 2;
}
.ppt-app .ppt-oeil svg { display: block; stroke: currentColor; }
.ppt-app .ppt-oeil:active { opacity: 0.6; }

/* Mode nuit : l'œil passe en gris clair, bien visible sur le
   champ sombre. */
html.ppt-nuit .ppt-app .ppt-oeil { color: #AEAEB2 !important; }

/* ════════════════════════════════════════════════════════════
 * ▓▓▓  LISIBILITÉ & PLEIN ÉCRAN — v3.5  ▓▓▓
 * ════════════════════════════════════════════════════════════ */

/* ─── 1. TITRE vs CONTENU : une vraie différence de nature ───
 * Le titre de section n'est plus « du texte blanc parmi du texte
 * blanc » : il est plus petit, en capitales espacées, teinté de
 * la couleur de marque, avec un filet — l'œil le repère
 * instantanément sans être agressé. */
.ppt-app .ppt-carte > h2 {
	font-size: 12.5px !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: var(--pp-teal) !important;
	padding-bottom: 10px;
	margin-bottom: 14px !important;
	border-bottom: 1px solid var(--pp-separateur);
}
html.ppt-nuit .ppt-app .ppt-carte > h2 {
	color: #4cc264 !important;          /* teal clair, lisible sur noir */
	border-bottom-color: #38383A !important;
}

/* Le CONTENU garde le corps normal : c'est lui qui porte
   l'information, donc plus gros et plus neutre que le titre. */
.ppt-app .ppt-stock-l1,
.ppt-app .ppt-client strong {
	font-size: 15px !important;
	font-weight: 600 !important;
}

/* ─── 2. ÉLÉMENTS OUBLIÉS DU MODE NUIT ─────────────────────
 * Le bouton de commentaire du superviseur, le champ de saisie
 * de mention, les notes explicatives sous les champs. */
html.ppt-nuit .ppt-app .ppt-dialogue > summary,
html.ppt-nuit .ppt-app .ppt-mention,
html.ppt-nuit .ppt-app .ppt-form-mention,
html.ppt-nuit .ppt-app .ppt-note,
html.ppt-nuit .ppt-app .ppt-details-corps,
html.ppt-nuit .ppt-app .ppt-toast {
	background: #2C2C2E !important;
	color: #E5E5EA !important;
	border-color: #38383A !important;
}
html.ppt-nuit .ppt-app .ppt-mention { border-left-color: #3DA592 !important; }
/* Les notes sous les champs (indicatif téléphonique…) : fond
   transparent, texte gris — plus de pavé blanc. */
html.ppt-nuit .ppt-app .ppt-note,
.ppt-app .ppt-note {
	background: transparent !important;
	border: none !important;
	padding: 2px 0 !important;
	font-size: 12px !important;
}
html.ppt-nuit .ppt-app .ppt-note { color: #8E8E93 !important; }

/* ─── 3. PLEIN ÉCRAN : plus de cadre blanc du thème ─────────
 * Le thème WordPress encadre le contenu ; le CRM doit occuper
 * toute la largeur, sur mobile comme sur tablette et PC. */
body.pp-crm-plein,
body.pp-crm-plein #page,
body.pp-crm-plein #content,
body.pp-crm-plein .site-content,
body.pp-crm-plein .entry-content,
body.pp-crm-plein .content-area,
body.pp-crm-plein main,
body.pp-crm-plein article {
	max-width: 100% !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	background: transparent !important;
}
/* On masque l'entête et le pied du thème : l'app est autonome. */
body.pp-crm-plein .site-header,
body.pp-crm-plein .site-footer,
body.pp-crm-plein header.entry-header,
body.pp-crm-plein .entry-header,
body.pp-crm-plein .entry-title,
body.pp-crm-plein .page-title,
body.pp-crm-plein .page-header,
body.pp-crm-plein h1.entry-title,
body.pp-crm-plein .wp-block-post-title,
body.pp-crm-plein .wp-block-post-title a,
body.pp-crm-plein .single-featured-image-header,
body.pp-crm-plein .post-thumbnail,
body.pp-crm-plein .breadcrumbs,
body.pp-crm-plein .wp-block-template-part { display: none !important; }

body.pp-crm-plein { background: var(--pp-fond, #F2F2F7); margin: 0; padding: 0; }
html.ppt-nuit body.pp-crm-plein { background: #000 !important; }

/* ─── 4. BARRE DE NAVIGATION en mode nuit : translucide ──── */
html.ppt-nuit .ppt-app .ppt-nav,
html.ppt-nuit .ppt-nav {
	background: rgba(28, 28, 30, 0.72) !important;
	-webkit-backdrop-filter: saturate(180%) blur(24px);
	backdrop-filter: saturate(180%) blur(24px);
	border-top: 0.5px solid rgba(255, 255, 255, 0.08) !important;
}
html.ppt-nuit .ppt-nav-item { color: #8E8E93 !important; }
html.ppt-nuit .ppt-nav-actif { color: #4cc264 !important; }
/* En mode jour aussi, on adoucit un peu la barre. */
.ppt-app .ppt-nav, .ppt-nav { background: rgba(255, 255, 255, 0.78); }

/* ─── BULLE DES MENTIONS : flottante, animée, non bloquante ──
 * Elle survole le contenu (position fixed) au lieu de le pousser,
 * pulse doucement pour attirer l'œil, et disparaît dès lecture. */
.ppt-app .ppt-bulle-mentions {
	position: fixed;
	left: 50%;
	bottom: 88px;                     /* juste au-dessus de la nav */
	transform: translateX(-50%);
	z-index: 150;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 92vw;
	padding: 11px 16px;
	background: var(--pp-teal);
	color: #fff !important;
	border-radius: 26px;
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
	box-shadow: 0 6px 22px rgba(29, 158, 58, 0.42);
	animation: ppt-bulle-entree 0.45s ease, ppt-bulle-pulse 2.6s ease-in-out 0.6s infinite;
}
.ppt-bulle-icone { font-size: 17px; line-height: 1; }
.ppt-bulle-texte { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ppt-bulle-fleche { font-size: 20px; line-height: 1; opacity: 0.85; }

@keyframes ppt-bulle-entree {
	from { opacity: 0; transform: translate(-50%, 14px); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes ppt-bulle-pulse {
	0%, 100% { box-shadow: 0 6px 22px rgba(29, 158, 58, 0.42); }
	50%      { box-shadow: 0 6px 30px rgba(29, 158, 58, 0.75); }
}
html.ppt-nuit .ppt-app .ppt-bulle-mentions {
	background: var(--ppt-vert);
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.6);
}

/* La mention non lue, mise en évidence dans la liste. */
.ppt-app .ppt-mention-neuve {
	background: rgba(29, 158, 58, 0.07);
	border-radius: 10px;
	padding: 10px !important;
	margin-bottom: 6px;
}
html.ppt-nuit .ppt-app .ppt-mention-neuve { background: rgba(111, 217, 198, 0.10); }
.ppt-app .ppt-mentions-lues > summary { color: var(--pp-gris) !important; }

@media print { .ppt-bulle-mentions { display: none !important; } }

/* ─── FEUILLE DE CONTACT (appeler / WhatsApp) ─────────────── */
.ppt-feuille-fond {
	position: fixed;
	inset: 0;
	z-index: 300;
	background: rgba(0, 0, 0, 0.35);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	animation: ppt-fond-entree 0.2s ease;
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}
@keyframes ppt-fond-entree { from { opacity: 0; } to { opacity: 1; } }

.ppt-feuille {
	width: 100%;
	max-width: 440px;
	margin: 0 8px calc(10px + env(safe-area-inset-bottom));
	background: #FFFFFF;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
	animation: ppt-feuille-entree 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes ppt-feuille-entree { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.ppt-feuille-titre {
	padding: 12px 16px;
	font-size: 12.5px;
	color: #8E8E93;
	text-align: center;
	border-bottom: 0.5px solid #E5E5EA;
}
.ppt-feuille-choix {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	font-size: 16px;
	font-weight: 500;
	color: #1C1C1E !important;
	text-decoration: none;
	border-bottom: 0.5px solid #E5E5EA;
}
.ppt-feuille-choix:active { background: #F2F2F7; }
.ppt-feuille-ico { font-size: 20px; }
.ppt-feuille-annuler {
	width: 100%;
	padding: 15px;
	background: none;
	border: none;
	font-size: 16px;
	font-weight: 600;
	color: var(--ppt-vert);
	cursor: pointer;
}

/* Mode nuit */
html.ppt-nuit .ppt-feuille { background: #1C1C1E; }
html.ppt-nuit .ppt-feuille-titre { color: #8E8E93; border-bottom-color: #38383A; }
html.ppt-nuit .ppt-feuille-choix { color: #F2F2F7 !important; border-bottom-color: #38383A; }
html.ppt-nuit .ppt-feuille-choix:active { background: #2C2C2E; }
html.ppt-nuit .ppt-feuille-annuler { color: #4cc264; }

/* ─── INDICATEUR D'ATTENTE (roue + texte) ─────────────────── */
.ppt-roue {
	display: inline-block;
	width: 15px;
	height: 15px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ppt-rotation 0.7s linear infinite;
	vertical-align: -2px;
	margin-right: 6px;
}
@keyframes ppt-rotation { to { transform: rotate(360deg); } }
.ppt-btn-attente { opacity: 0.85; pointer-events: none; }
/* Sur fond clair (back-office), la roue passe en teal. */
.pp-crm .ppt-roue { border-color: rgba(29,158,58,0.3); border-top-color: var(--ppt-vert); }

/* ════════════════════════════════════════════════════════════
 * ▓▓▓  ÉQUILIBRAGE DES BLOCS + FINITIONS NUIT — v3.6  ▓▓▓
 * ════════════════════════════════════════════════════════════ */

/* ─── 1. TOUS LES BLOCS À LA MÊME LARGEUR ──────────────────
 * Les cartes venues du back-office (.ppt-etats-admin .pp-carte)
 * avaient leurs propres marges : elles paraissaient plus
 * étroites ou décalées. On aligne tout sur la même gouttière. */
.ppt-app > .ppt-carte,
.ppt-app > .ppt-compteurs,
.ppt-app > .ppt-kpis,
.ppt-app .ppt-etats-admin,
.ppt-app .ppt-etats-admin .pp-carte,
.ppt-app .ppt-etats-admin .wrap {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box;
}
.ppt-app .ppt-etats-admin .pp-carte {
	background: var(--pp-carte) !important;
	border: none !important;
	border-radius: var(--pp-rayon) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
	padding: 16px !important;
	margin: 0 0 14px !important;
}
/* La gouttière latérale est portée UNE SEULE FOIS par l'app. */
.ppt-app { padding-left: 14px; padding-right: 14px; }
.ppt-app .ppt-carte { margin-left: 0 !important; margin-right: 0 !important; }

/* ─── 2. FINITIONS DU MODE NUIT ────────────────────────────
 * Derniers textes restés sombres (donc illisibles) : titres de
 * l'accueil délégué, libellés de compteurs, textes des états
 * réutilisés du back-office, légendes de graphiques. */
html.ppt-nuit .ppt-app,
html.ppt-nuit .ppt-app * {
	/* On ne force PAS tout en blanc : on rétablit seulement les
	   éléments qui n'avaient pas de couleur explicite. */
	border-color: #38383A;
}
html.ppt-nuit .ppt-app .ppt-compteur,
html.ppt-nuit .ppt-app .ppt-compteur strong,
html.ppt-nuit .ppt-app .ppt-etats-admin,
html.ppt-nuit .ppt-app .ppt-etats-admin p,
html.ppt-nuit .ppt-app .ppt-etats-admin li,
html.ppt-nuit .ppt-app .ppt-etats-admin strong,
html.ppt-nuit .ppt-app .ppt-etats-admin span,
html.ppt-nuit .ppt-app .ppt-etats-admin div,
html.ppt-nuit .ppt-app .pp-synthese-ia,
html.ppt-nuit .ppt-app .pp-synthese-ia * {
	color: #E5E5EA !important;
}
html.ppt-nuit .ppt-app .ppt-etats-admin h1,
html.ppt-nuit .ppt-app .ppt-etats-admin h2,
html.ppt-nuit .ppt-app .ppt-etats-admin h3 { color: #4cc264 !important; }
/* Les barres de progression et jauges. */
html.ppt-nuit .ppt-app .pp-progression,
html.ppt-nuit .ppt-app .pp-progression-piste { background: #2C2C2E !important; }
/* Les liens dans les états. */
html.ppt-nuit .ppt-app .ppt-etats-admin a { color: #4cc264 !important; }
/* Les zones de saisie inline (mention du superviseur). */
html.ppt-nuit .ppt-app .ppt-dialogue input,
html.ppt-nuit .ppt-app .ppt-dialogue textarea { background: #2C2C2E !important; color: #F2F2F7 !important; }

/* ─── Fiche d'activité d'un délégué ───────────────────────── */
.ppt-fiche-entete { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ppt-fiche-photo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }

/* La ligne d'objectif cliquable (tableau de bord direction). */
.ppt-app .ppt-progression-lien {
	display: block;
	text-decoration: none;
	padding: 8px;
	margin: 0 -8px;
	border-radius: 10px;
	color: inherit;
}
.ppt-app .ppt-progression-lien:active { background: rgba(29, 158, 58, 0.08); }
html.ppt-nuit .ppt-app .ppt-progression-lien:active { background: rgba(111, 217, 198, 0.12); }

/* ════════════════════════════════════════════════════════════
 * ▓▓▓  MODE NUIT — AUDIT COMPLET v3.7  ▓▓▓
 * ════════════════════════════════════════════════════════════
 * Règle de base : en mode nuit, TOUT texte hérite d'une couleur
 * claire. On repart de la racine et on ne réintroduit du sombre
 * QUE là où le fond est clair (badges, boutons pleins, feuille
 * de contact). Fini les textes noirs invisibles. */

html.ppt-nuit .ppt-app,
html.ppt-nuit .ppt-app *:not(script):not(style) {
	color: inherit;
}
html.ppt-nuit .ppt-app { color: #E5E5EA !important; }

/* Les titres et éléments forts. */
html.ppt-nuit .ppt-app h1,
html.ppt-nuit .ppt-app h2,
html.ppt-nuit .ppt-app h3,
html.ppt-nuit .ppt-app h4,
html.ppt-nuit .ppt-app strong,
html.ppt-nuit .ppt-app b,
html.ppt-nuit .ppt-app th,
html.ppt-nuit .ppt-app td,
html.ppt-nuit .ppt-app li,
html.ppt-nuit .ppt-app dt,
html.ppt-nuit .ppt-app dd,
html.ppt-nuit .ppt-app legend,
html.ppt-nuit .ppt-app caption,
html.ppt-nuit .ppt-app summary,
html.ppt-nuit .ppt-app em,
html.ppt-nuit .ppt-app i { color: #F2F2F7 !important; }

/* Les titres de carte gardent leur teinte de marque. */
html.ppt-nuit .ppt-app .ppt-carte > h2,
html.ppt-nuit .ppt-app .ppt-sous-titre,
html.ppt-nuit .ppt-app .ppt-etats-admin h2 { color: #4cc264 !important; }

/* Les textes secondaires : gris clair (jamais sombre). */
html.ppt-nuit .ppt-app small,
html.ppt-nuit .ppt-app .description,
html.ppt-nuit .ppt-app .ppt-note,
html.ppt-nuit .ppt-app .ppt-vide,
html.ppt-nuit .ppt-app .ppt-stock-sub,
html.ppt-nuit .ppt-app label,
html.ppt-nuit .ppt-app .ppt-user,
html.ppt-nuit .ppt-app th { color: #AEAEB2 !important; }

/* Les liens. */
html.ppt-nuit .ppt-app a { color: #4cc264; }
html.ppt-nuit .ppt-app a.ppt-btn { color: #fff !important; }
html.ppt-nuit .ppt-app a.ppt-btn-secondaire { color: #4cc264 !important; }

/* Les champs de saisie et leur texte de substitution. */
html.ppt-nuit .ppt-app input,
html.ppt-nuit .ppt-app select,
html.ppt-nuit .ppt-app textarea,
html.ppt-nuit .ppt-app option {
	background-color: #2C2C2E !important;
	color: #F2F2F7 !important;
}
html.ppt-nuit .ppt-app ::placeholder { color: #8E8E93 !important; opacity: 1; }
/* iOS colore les champs auto-remplis en jaune pâle : on neutralise. */
html.ppt-nuit .ppt-app input:-webkit-autofill,
html.ppt-nuit .ppt-app input:-webkit-autofill:focus {
	-webkit-text-fill-color: #F2F2F7 !important;
	-webkit-box-shadow: 0 0 0 1000px #2C2C2E inset !important;
	caret-color: #F2F2F7;
}
.ppt-app input:-webkit-autofill,
.ppt-app input:-webkit-autofill:focus {
	-webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;   /* mode jour */
	-webkit-text-fill-color: #1C1C1E !important;
}

/* Le CODE et les variables de message ({nom}, {zone}…) : fond
   sombre et texte clair (ils apparaissaient en blanc sur blanc). */
html.ppt-nuit .ppt-app code,
html.ppt-nuit .ppt-app kbd,
html.ppt-nuit .ppt-app pre {
	background: #2C2C2E !important;
	color: #4cc264 !important;
	border-radius: 5px;
	padding: 1px 5px;
}
.ppt-app code { background: #F2F2F7; color: var(--ppt-vert-fonce); border-radius: 5px; padding: 1px 5px; }

/* EXCEPTIONS — éléments à fond clair qui gardent un texte sombre. */
html.ppt-nuit .ppt-feuille,
html.ppt-nuit .ppt-feuille * { color: #F2F2F7 !important; }
html.ppt-nuit .ppt-app .ppt-badge-a { color: #6FE39A !important; }
html.ppt-nuit .ppt-app .ppt-badge-b { color: #FFC15E !important; }
html.ppt-nuit .ppt-app .ppt-badge-c { color: #C7C7CC !important; }
html.ppt-nuit .ppt-app .ppt-btn,
html.ppt-nuit .ppt-app .ppt-btn * { color: #fff !important; }
html.ppt-nuit .ppt-app .ppt-btn-secondaire,
html.ppt-nuit .ppt-app .ppt-btn-secondaire * { color: #4cc264 !important; }
html.ppt-nuit .ppt-app .ppt-nav-item { color: #8E8E93 !important; }
html.ppt-nuit .ppt-app .ppt-nav-actif,
html.ppt-nuit .ppt-app .ppt-nav-actif * { color: #4cc264 !important; }
html.ppt-nuit .ppt-app .ppt-bulle-mentions,
html.ppt-nuit .ppt-app .ppt-bulle-mentions * { color: #fff !important; }
/* Les documents d'impression restent en clair (fond blanc). */
html.ppt-nuit body.pp-doc, html.ppt-nuit body.pp-doc * { color: #1C1C1E !important; }

/* ─── GÉOLOCALISATION DES VISITES ─────────────────────────── */

/* L'encart du formulaire : état du relevé de position. */
.ppt-app .ppt-geo-encart {
	background: var(--pp-teal-pale);
	border-radius: var(--pp-rayon-sm);
	padding: 11px 13px;
	margin: 4px 0 14px;
	border-left: 3px solid var(--pp-teal);
}
.ppt-app .ppt-geo-encart .ppt-geo-etat {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--pp-teal-fonce);
	margin-bottom: 2px;
}
.ppt-app .ppt-geo-attente { border-left-color: var(--pp-gris); }
.ppt-app .ppt-geo-ok      { border-left-color: #34C759; }
.ppt-app .ppt-geo-ko      { border-left-color: var(--pp-orange); }
.ppt-app .ppt-geo-ko .ppt-geo-etat { color: #C93400; }

html.ppt-nuit .ppt-app .ppt-geo-encart { background: #1E2C2A !important; }
html.ppt-nuit .ppt-app .ppt-geo-encart .ppt-geo-etat { color: #4cc264 !important; }
html.ppt-nuit .ppt-app .ppt-geo-ko .ppt-geo-etat { color: #FFC15E !important; }

/* La pastille d'indicateur dans les comptes rendus. */
.ppt-app .ppt-geo {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
}
.ppt-app .ppt-geo svg { width: 13px; height: 13px; flex: 0 0 auto; }
.ppt-app .ppt-geo-ok     { background: rgba(52,199,89,0.15);  color: #248A3D !important; }
.ppt-app .ppt-geo-moyen  { background: rgba(255,149,0,0.15);  color: #C93400 !important; }
.ppt-app .ppt-geo-alerte { background: rgba(255,59,48,0.15);  color: var(--ppt-rouge) !important; }
.ppt-app .ppt-geo-neutre { background: rgba(142,142,147,0.15); color: #6C6C70 !important; }
.ppt-app .ppt-geo-carte  { font-size: 12px; margin-left: 6px; }

html.ppt-nuit .ppt-app .ppt-geo-ok     { background: rgba(52,199,89,0.22);  color: #6FE39A !important; }
html.ppt-nuit .ppt-app .ppt-geo-moyen  { background: rgba(255,159,10,0.22); color: #FFC15E !important; }
html.ppt-nuit .ppt-app .ppt-geo-alerte { background: rgba(255,69,58,0.22);  color: #FF6961 !important; }
html.ppt-nuit .ppt-app .ppt-geo-neutre { background: rgba(142,142,147,0.25); color: #C7C7CC !important; }

/* ─── Icône d'itinéraire sur les visites planifiées ───────── */
.ppt-app .ppt-itineraire {
	padding: 7px 11px !important;
	font-size: 15px !important;
	line-height: 1;
	text-decoration: none;
}
/* Elle reste discrète, à côté du bouton Réaliser. */
.ppt-app .ppt-visite-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ─── Auteur d'une mention (plusieurs superviseurs) ───────── */
.ppt-app .ppt-mention-auteur {
	display: block;
	font-size: 11.5px;
	font-style: italic;
	color: var(--pp-gris);
	margin-top: 2px;
}
html.ppt-nuit .ppt-app .ppt-mention-auteur { color: #8E8E93 !important; }

/* ════════════════════════════════════════════════════════════
 * ▓▓▓  BARRE DE NAVIGATION — anti-débordement (6 onglets)  ▓▓▓
 * ════════════════════════════════════════════════════════════
 * Avec 5 ou 6 onglets sur un écran étroit, le dernier était
 * coupé. On garantit que tous tiennent, en resserrant le padding
 * de la pilule active et en laissant chaque onglet rétrécir. */
.ppt-nav {
	justify-content: stretch !important;
	gap: 0;
}
.ppt-nav .ppt-nav-item {
	flex: 1 1 0 !important;
	min-width: 0 !important;
}
.ppt-nav a {
	padding: 7px 4px !important;   /* moins large que 10px */
	margin: 0 2px;
}
.ppt-nav-libelle {
	display: block;
	max-width: 100%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Écrans étroits (≤380px) : on réduit encore un cran pour que
   6 onglets tiennent sans coupure. */
@media (max-width: 380px) {
	.ppt-nav-item { font-size: 10px; }
	.ppt-nav-libelle { font-size: 9.5px; }
	.ppt-nav-icone { font-size: 18px !important; }
	.ppt-nav a { padding: 6px 2px !important; margin: 0 1px; }
}

/* ════════════════════════════════════════════════════════════
 * MODE APPLICATION (PWA) — ajustements plein écran
 * ════════════════════════════════════════════════════════════
 * Quand le CRM tourne en application installée (standalone), il
 * n'y a plus la barre du navigateur : on respecte les zones sûres
 * de l'écran (encoches, barre d'accueil) pour ne rien masquer. */
@media (display-mode: standalone) {
	.ppt-app {
		padding-top: env(safe-area-inset-top);
	}
	.ppt-nav {
		padding-bottom: calc(8px + env(safe-area-inset-bottom));
	}
	/* L'en-tête colle un peu plus haut puisqu'il n'y a plus la
	   barre d'adresse au-dessus. */
	.ppt-entete {
		padding-top: calc(8px + env(safe-area-inset-top));
	}
}

/* ════════════════════════════════════════════════════════════
 * BARRE ADMIN WORDPRESS sur la page CRM
 * ════════════════════════════════════════════════════════════
 * En mode application plein écran, on neutralise la marge que
 * WordPress réserve à sa barre : le CRM occupe tout le haut. */
@media (display-mode: standalone) {
	html { margin-top: 0 !important; }
	#wpadminbar { display: none !important; }
}
/* En mode application (standalone), la barre est déjà masquée
   ci-dessus. En navigateur, l'admin conserve sa barre : on n'y
   touche pas — seul le délégué ne la voit pas (géré côté serveur
   par show_admin_bar). */

/* ─── Actions sur une ligne (Modifier / Supprimer) ────────── */
.ppt-app .ppt-stock-actions {
	display: flex; gap: 14px; margin-top: 6px;
}
.ppt-app .ppt-lien-action {
	font-size: 12.5px; text-decoration: none; color: var(--ppt-vert);
	font-weight: 600; cursor: pointer;
}
.ppt-app .ppt-lien-action.ppt-lien-danger { color: var(--ppt-rouge); }
html.ppt-nuit .ppt-app .ppt-lien-danger { color: #FF6B5E; }

/* ─── Bandeau d'alertes (stock bas, AMM proche) ───────────── */
.ppt-app .ppt-alertes h2 { color: var(--ppt-rouge); }
.ppt-app .ppt-ligne-alerte {
	display: flex; justify-content: space-between; align-items: center;
	padding: 10px 12px; margin: 6px 0; border-radius: 10px;
	font-size: 13.5px;
}
/* Une alerte cliquable garde l'apparence d'une ligne d'alerte, mais
   se comporte comme un lien (pas de soulignement, couleur héritée). */
.ppt-app a.ppt-ligne-alerte-lien {
	text-decoration: none;
	color: inherit;
	transition: filter .15s ease;
}
.ppt-app a.ppt-ligne-alerte-lien:hover,
.ppt-app a.ppt-ligne-alerte-lien:active { filter: brightness(0.95); }
.ppt-app .ppt-alerte-rouge {
	background: rgba(192, 57, 43, 0.12);
	border-left: 4px solid var(--ppt-rouge);
}
.ppt-app .ppt-alerte-orange {
	background: rgba(232, 161, 58, 0.14);
	border-left: 4px solid #E8A13A;
}
html.ppt-nuit .ppt-app .ppt-alerte-rouge { background: rgba(192,57,43,0.22); }
html.ppt-nuit .ppt-app .ppt-alerte-orange { background: rgba(232,161,58,0.20); }

/* ─── Boutons "mesurés" (IA, déconnexion) : pas pleine largeur ─ */
.ppt-app .ppt-btn-mesure {
	display: inline-block;
	width: auto;
	min-height: 40px;
	padding: 10px 20px;
	font-size: 14px;
	margin-top: 8px;
}

/* ─── Chat IA (page Analyses) ─────────────────────────────── */
.pp-chat-ia { margin-top: 16px; }
.pp-chat-fil {
	max-height: 340px; overflow-y: auto;
	display: flex; flex-direction: column; gap: 8px;
	padding: 6px 0; margin: 10px 0;
}
.pp-chat-bulle {
	max-width: 88%; padding: 10px 13px; border-radius: 14px;
	font-size: 14px; line-height: 1.45; white-space: normal;
}
.pp-chat-user {
	align-self: flex-end; background: var(--ppt-vert-fonce); color: #fff;
	border-bottom-right-radius: 4px;
}
.pp-chat-assistant {
	align-self: flex-start; background: #e4f4e9; color: #1C2B29;
	border-bottom-left-radius: 4px;
}
.pp-chat-erreur {
	align-self: flex-start; background: #FDE8E6; color: var(--ppt-rouge);
	border-radius: 10px;
}
.pp-chat-assistant p:first-child { margin-top: 0; }
.pp-chat-assistant p:last-child { margin-bottom: 0; }
.pp-chat-saisie { display: flex; gap: 8px; align-items: flex-end; }
.pp-chat-saisie textarea {
	flex: 1; border-radius: 10px; padding: 10px;
	border: 1px solid #c5d8cb; font-family: inherit; font-size: 14px;
	resize: vertical; min-height: 44px;
}
html.ppt-nuit .pp-chat-assistant { background: #23303C; color: #E7EDEB; }
html.ppt-nuit .pp-chat-saisie textarea { background: #1A2530; color: #E7EDEB; border-color: #3A4A55; }

/* ─── Filtre par classement (chips A/B/C) ─────────────────── */
.ppt-app .ppt-filtres-classe {
	display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px;
}
.ppt-app .ppt-chip {
	padding: 6px 14px; border-radius: 999px; font-size: 13px;
	text-decoration: none; background: #e4f4e9; color: var(--ppt-vert-fonce);
	border: 1px solid transparent; font-weight: 600;
}
.ppt-app .ppt-chip-actif {
	background: var(--ppt-vert-fonce); color: #fff;
}
html.ppt-nuit .ppt-app .ppt-chip { background: #23303C; color: #7dd894; }
html.ppt-nuit .ppt-app .ppt-chip-actif { background: #4cc264; color: #fff; }

/* ─── Mode hors connexion ─────────────────────────────────── */
.ppt-app .ppt-hors-ligne-badge,
.ppt-hors-ligne-badge {
	display: inline-flex; align-items: center; gap: 6px;
	background: #E8A13A; color: #1C2B29;
	padding: 5px 12px; border-radius: 999px;
	font-size: 12.5px; font-weight: 700;
	margin: 8px 12px 0;
}
.ppt-hors-ligne-annonce {
	position: fixed; left: 12px; right: 12px; bottom: 80px;
	background: var(--ppt-vert-fonce); color: #fff;
	padding: 12px 16px; border-radius: 12px;
	font-size: 13.5px; z-index: 10000;
	box-shadow: 0 6px 24px rgba(0,0,0,0.25);
	text-align: center;
}

/* ─── Écrans hors connexion ───────────────────────────────── */
.ppt-app #pp-hl-ecran .ppt-champ,
.ppt-app #pp-hl-ecran input[type="search"],
.ppt-app #pp-hl-ecran input[type="text"],
.ppt-app #pp-hl-ecran input[type="tel"],
.ppt-app #pp-hl-ecran textarea,
.ppt-app #pp-hl-ecran select {
	width: 100%; box-sizing: border-box;
	padding: 11px; margin: 4px 0 10px;
	border: 1px solid #c5d8cb; border-radius: 10px;
	font-size: 15px; font-family: inherit; background: #fff;
}
.ppt-app #pp-hl-ecran .ppt-tel-groupe { display: flex; gap: 8px; }
.ppt-app #pp-hl-ecran .ppt-tel-groupe .ppt-indicatif { width: 110px; }
.ppt-app .ppt-hl-liste { margin-top: 8px; }
.ppt-app .ppt-client-item {
	display: flex; justify-content: space-between; align-items: center;
	padding: 10px 4px; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.ppt-app .ppt-hl-carte h2 { color: var(--ppt-vert-fonce); }
html.ppt-nuit .ppt-app #pp-hl-ecran .ppt-champ,
html.ppt-nuit .ppt-app #pp-hl-ecran input,
html.ppt-nuit .ppt-app #pp-hl-ecran textarea,
html.ppt-nuit .ppt-app #pp-hl-ecran select {
	background: #1A2530; color: #E7EDEB; border-color: #3A4A55;
}

/* ─── Comptabilité terrain ────────────────────────────────── */
.ppt-app .ppt-compteur-accent { background: var(--ppt-vert-fonce); color: #fff; }
.ppt-app .ppt-compteur-accent strong { color: #fff; }
.ppt-app .ppt-compta-ligne {
	padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.ppt-app .ppt-compta-ligne:last-child { border-bottom: none; }
.ppt-app .ppt-compta-ligne-tete {
	display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}
.ppt-app .ppt-compta-part { font-weight: 700; color: var(--ppt-vert-fonce); white-space: nowrap; }
.ppt-app .ppt-compta-total { border-top: 2px solid var(--ppt-vert-fonce); margin-top: 6px; padding-top: 10px; }
.ppt-app .ppt-compta-total .ppt-compta-part { font-size: 16px; }
html.ppt-nuit .ppt-app .ppt-compta-part { color: #7dd894; }
html.ppt-nuit .ppt-app .ppt-compteur-accent { background: #4cc264; }

/* ─── Filtre de période de la comptabilité (mobile) ───────── */
.ppt-app .ppt-compta-filtre { display: block; }
.ppt-app .ppt-compta-filtre-dates {
	display: flex; gap: 10px; margin-bottom: 10px;
}
.ppt-app .ppt-compta-champ { flex: 1 1 0; display: flex; flex-direction: column; }
.ppt-app .ppt-compta-champ label {
	font-size: 12px; color: #6B7B78; margin-bottom: 4px; line-height: 1.2;
}
.ppt-app .ppt-compta-champ input[type="date"] {
	width: 100%; height: 44px; box-sizing: border-box;
	padding: 0 10px; margin: 0;
	border: 1px solid #c5d8cb; border-radius: 10px;
	display: flex; align-items: center; background: #fff;
}
.ppt-app .ppt-compta-filtre-actions { display: flex; gap: 10px; }
.ppt-app .ppt-compta-filtre-actions .ppt-btn {
	flex: 1 1 0; height: 44px;
	display: flex; align-items: center; justify-content: center; margin: 0;
}
html.ppt-nuit .ppt-app .ppt-compta-champ input[type="date"] {
	background: #1A2530; color: #E7EDEB; border-color: #3A4A55;
}
html.ppt-nuit .ppt-app .ppt-compta-champ label { color: #9FB4AF; }

/* ─── Case à cocher terrain (réaffectation personne) ──────── */
.ppt-app .ppt-check {
	display: flex; align-items: flex-start; gap: 10px;
	margin: 10px 0; font-size: 14px; line-height: 1.4; cursor: pointer;
}
.ppt-app .ppt-check input[type="checkbox"] {
	width: 20px; height: 20px; margin-top: 1px; flex: 0 0 auto;
}
.ppt-app .ppt-check-attention {
	background: #FFF4E0; border: 1px solid #E8A13A;
	border-radius: 10px; padding: 10px 12px;
}
html.ppt-nuit .ppt-app .ppt-check-attention {
	background: #3A2E18; border-color: #E8A13A;
}

/* Écrans produits/prix du gestionnaire de stock */
.ppt-app .ppt-ligne-inactive { opacity: .6; }
.ppt-app .ppt-etiquette-retire {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	color: #b00020;
	background: #fde8ea;
	border-radius: 6px;
	padding: 1px 7px;
	margin-left: 6px;
	vertical-align: middle;
}
html.ppt-nuit .ppt-app .ppt-etiquette-retire { background: #4a2226; color: #ff9aa5; }

/* Écran des seuils de stock par grossiste */
.ppt-app .ppt-seuil-bloc {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 12px;
	margin: 10px 0;
}
.ppt-app .ppt-seuil-tete {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}
.ppt-app .ppt-seuil-champs {
	display: flex;
	gap: 8px;
	align-items: flex-end;
}
.ppt-app .ppt-seuil-champs label {
	flex: 1 1 0;
	min-width: 0;
	font-size: 12px;
	color: #555;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.ppt-app .ppt-seuil-champs input {
	width: 100%;
	text-align: right;
	box-sizing: border-box;
}
.ppt-app .ppt-etiquette-nondef {
	font-size: 11px;
	font-weight: 600;
	color: #8a6d00;
	background: #fff3cd;
	border-radius: 6px;
	padding: 2px 8px;
}
html.ppt-nuit .ppt-app .ppt-seuil-bloc { background: #1f2430; border-color: #333b4d; }
html.ppt-nuit .ppt-app .ppt-etiquette-nondef { background: #4a3f1a; color: #ffd966; }

/* Rubriques de visite : listes à choix multiples (style iOS) */
.ppt-app .ppt-rubrique {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-bottom: 6px;
}
.ppt-app .ppt-form label.ppt-rub-option {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	box-sizing: border-box;
	min-height: 44px;               /* hauteur tactile iOS constante */
	flex: 0 1 auto;                 /* jamais d'étirement du 1er élément */
	width: auto;
	max-width: 100%;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	color: inherit;
	margin: 0;
	padding: 0 16px;
	background: #f2f2f7;            /* gris iOS (systemGray6) */
	border: none;
	border-radius: 22px;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s ease, color .15s ease;
	-webkit-tap-highlight-color: transparent;
}
/* La case à cocher native est remplacée par une pastille ronde,
   pour un rendu homogène sur iOS et Android. */
.ppt-app .ppt-form label.ppt-rub-option input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	margin: 0;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 1.5px solid #c4c4cc;
	background: transparent;
	position: relative;
	transition: border-color .15s ease, background .15s ease;
}
.ppt-app .ppt-form label.ppt-rub-option input[type="checkbox"]:checked {
	background: var(--ppt-vert);
	border-color: var(--ppt-vert);
}
/* La coche blanche (pseudo-élément) apparaît quand c'est coché. */
.ppt-app .ppt-form label.ppt-rub-option input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 2.5px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.ppt-app .ppt-form label.ppt-rub-option:has(input:checked) {
	background: rgba(46, 134, 122, 0.14);
	color: #0f5133;
	font-weight: 600;
}
.ppt-app .ppt-rub-autre {
	flex: 1 1 100%;
	margin-top: 6px;
}
html.ppt-nuit .ppt-app .ppt-form label.ppt-rub-option {
	background: #2c2c2e;            /* gris iOS foncé */
	color: #e8eaed;
}
html.ppt-nuit .ppt-app .ppt-form label.ppt-rub-option input[type="checkbox"] {
	border-color: #5a5a60;
}
html.ppt-nuit .ppt-app .ppt-form label.ppt-rub-option input[type="checkbox"]:checked {
	background: #4cc264;
	border-color: #4cc264;
}
html.ppt-nuit .ppt-app .ppt-form label.ppt-rub-option:has(input:checked) {
	background: rgba(63,165,150,0.22);
	color: #8ee3a2;
}

/* Rubriques de visite : bloc repliable (details/summary) */
.ppt-app .ppt-rub-repli {
	border: none;
	border-radius: 16px;
	margin: 10px 0;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
}
.ppt-app .ppt-rub-repli > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 15px 16px;
	cursor: pointer;
	list-style: none;
	font-weight: 600;
	font-size: 15px;
	color: var(--ppt-encre, #1a1a1a);
	-webkit-tap-highlight-color: transparent;
}
.ppt-app .ppt-rub-repli > summary::-webkit-details-marker { display: none; }
.ppt-app .ppt-rub-repli > summary::after {
	content: "";
	flex: 0 0 auto;
	order: 3;
	width: 8px;
	height: 8px;
	margin-left: 4px;
	border-right: 2px solid #c4c4cc;
	border-bottom: 2px solid #c4c4cc;
	transform: rotate(45deg);
	transition: transform .2s ease;
}
.ppt-app .ppt-rub-repli[open] > summary::after { transform: rotate(225deg); }
.ppt-app .ppt-rub-titre { flex: 1 1 auto; }
.ppt-app .ppt-rub-resume {
	flex: 0 0 auto;
	font-weight: 600;
	font-size: 13px;
	color: var(--ppt-vert);
	background: rgba(46, 134, 122, 0.12);
	border-radius: 20px;
	padding: 3px 12px;
	white-space: nowrap;
}
.ppt-app .ppt-rub-repli[open] > summary {
	border-bottom: 1px solid #f0f0f2;
}
.ppt-app .ppt-rub-repli > .ppt-rubrique {
	padding: 14px 16px 16px;
	margin-bottom: 0;
}
html.ppt-nuit .ppt-app .ppt-rub-repli {
	background: #1c1c1e;
	box-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.06);
}
html.ppt-nuit .ppt-app .ppt-rub-repli > summary { color: #e8eaed; }
html.ppt-nuit .ppt-app .ppt-rub-repli[open] > summary { border-bottom-color: #2c2c2e; }
html.ppt-nuit .ppt-app .ppt-rub-repli > summary::after { border-color: #5a5a60; }
html.ppt-nuit .ppt-app .ppt-rub-resume { background: rgba(63,165,150,0.20); color: #7dd894; }

/* Engagement : sélecteur de cible manuel (repli si type client absent) */
.ppt-app .ppt-engagement-cible {
	flex: 1 1 100%;
	display: flex;
	gap: 8px;
	margin-bottom: 10px;
}
.ppt-app .ppt-cible-btn {
	flex: 1 1 auto;
	min-height: 40px;
	padding: 0 14px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ppt-vert);
	background: rgba(46, 134, 122, 0.10);
	border: 1px solid rgba(46, 134, 122, 0.35);
	border-radius: 20px;
	cursor: pointer;
}
.ppt-app .ppt-cible-btn.ppt-cible-actif {
	color: #fff;
	background: var(--ppt-vert);
	border-color: var(--ppt-vert);
}
html.ppt-nuit .ppt-app .ppt-cible-btn { background: rgba(63,165,150,0.15); color: #7dd894; border-color: rgba(63,165,150,0.4); }
html.ppt-nuit .ppt-app .ppt-cible-btn.ppt-cible-actif { background: #4cc264; color: #0d1117; }

/* Écran « Visites en attente » (mode hors-ligne) */
.ppt-app .pp-hl-attente-ligne {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}
.ppt-app .pp-hl-attente-info { flex: 1 1 auto; min-width: 0; }
.ppt-app .pp-hl-attente-info strong { display: block; }
.ppt-app .pp-hl-attente-actions { flex: 0 0 auto; display: flex; gap: 6px; }
.ppt-app .pp-hors-ligne-badge.pp-badge-echec {
	background: rgba(192, 57, 43, 0.15);
	color: var(--ppt-rouge);
}

/* ============================================================
 * V3.38 — FINITION iOS PRO (accueil)
 * ============================================================
 * Couche maîtresse posée en dernier pour un rendu cohérent et
 * moderne, sur les couleurs du logo. Elle unifie ce que les
 * couches successives avaient laissé incohérent (compteur
 * signature, ombres, coins, séparateurs).
 */

/* --- Compteur signature : le dégradé du logo, bien net (jour) --- */
.ppt-app .ppt-compteurs > .ppt-compteur:first-child:not(.ppt-compteur-alerte) {
	background: var(--pp-degrade) !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	border: none !important;
	color: #fff !important;
	box-shadow: 0 8px 22px rgba(29, 158, 58, 0.30) !important;
	border-radius: 20px !important;
}
.ppt-app .ppt-compteurs > .ppt-compteur:first-child:not(.ppt-compteur-alerte) strong,
.ppt-app .ppt-compteurs > .ppt-compteur:first-child:not(.ppt-compteur-alerte) * {
	color: #fff !important;
}
html.ppt-nuit .ppt-app .ppt-compteurs > .ppt-compteur:first-child:not(.ppt-compteur-alerte) {
	background: linear-gradient(140deg, #0f4a32 0%, #4cc264 135%) !important;
}

/* --- Le 2e compteur : verre dépoli léger, coins alignés --- */
.ppt-app .ppt-compteurs > .ppt-compteur:not(:first-child) {
	border-radius: 20px !important;
}

/* --- Cartes de l'accueil : coins plus doux, ombre plus riche --- */
.ppt-app > .ppt-carte {
	border-radius: 20px !important;
	box-shadow: 0 4px 16px rgba(19, 88, 60, 0.06), 0 1px 3px rgba(19, 88, 60, 0.04) !important;
}

/* --- Séparateurs de liste NETS (fini les traits discontinus) ---
   Le 0.5px rendait mal sur mobile : on passe à 1px pleine largeur,
   couleur douce, et on retire toute bordure concurrente. */
.ppt-app .ppt-stock-item,
.ppt-app .ppt-client {
	border-top: none !important;
	border-bottom: 1px solid var(--pp-separateur) !important;
	border-radius: 0 !important;
}
.ppt-app .ppt-stock-item:last-child,
.ppt-app .ppt-client:last-child {
	border-bottom: none !important;
}

/* --- Titres de section : le vert foncé du logo, lisibles --- */
.ppt-app .ppt-carte h2,
.ppt-app .ppt-section-titre {
	color: var(--pp-teal-fonce) !important;
}
/* En nuit, un vert clair lisible sur fond noir (bat le filet blanc global). */
html.ppt-nuit .ppt-app .ppt-carte > h2,
html.ppt-nuit .ppt-app .ppt-carte h2,
html.ppt-nuit .ppt-app .ppt-section-titre {
	color: #4cc264 !important;
}

/* --- Boutons pleine largeur : plus généreux, ombre portée --- */
.ppt-app .ppt-btn-large {
	min-height: 48px !important;
	border-radius: 999px !important;
	font-weight: 700 !important;
	box-shadow: 0 4px 14px rgba(19, 88, 60, 0.22) !important;
	letter-spacing: 0.01em;
}
.ppt-app .ppt-btn-large.ppt-btn-secondaire {
	box-shadow: none !important;
}

/* --- Alertes de stock (rupture) : rouge visible en jour ET nuit ---
   La classe .ppt-negatif était écrasée par le filet blanc global du
   mode nuit et par des règles plus spécifiques. On la force ici. */
.ppt-app .ppt-negatif,
.ppt-app span.ppt-negatif,
.ppt-app strong.ppt-negatif,
html.ppt-nuit .ppt-app .ppt-negatif,
html.ppt-nuit .ppt-app span.ppt-negatif,
html.ppt-nuit .ppt-app strong.ppt-negatif,
html.ppt-nuit .ppt-app summary .ppt-negatif {
	color: #FF5A4D !important;   /* rouge iOS lisible sur clair comme sur noir */
	font-weight: 700 !important;
}

/* --- Accordéons de stock : coins arrondis propres (fini les
   contours discontinus en nuit). Le fond opaque du summary et du
   corps débordait sur les coins arrondis de la bordure → on clippe
   avec overflow:hidden pour que tout respecte le rayon. --- */
.ppt-app .ppt-accordeon {
	overflow: hidden;
	border-radius: 14px !important;
}
html.ppt-nuit .ppt-app .ppt-accordeon {
	border: 1px solid #38383A !important;
}
html.ppt-nuit .ppt-app .ppt-accordeon summary,
html.ppt-nuit .ppt-app .ppt-accordeon-corps {
	border-left: none !important;
	border-right: none !important;
}

/* ============================================================
 * V3.40 — BOUTONS UNIFORMISÉS (approche mixte)
 * ============================================================
 * Style pro dernière génération, validé avec Victor :
 *  - Par défaut (sur fond clair : cartes, formulaires) → boutons
 *    PLEINS avec coins doux + ombre colorée (relief), lisibles au
 *    soleil.
 *  - Sur fond coloré (barre de navigation) → effet VERRE DÉPOLI.
 * Posé en dernier pour s'imposer sur les couches antérieures.
 */

/* --- Bouton principal : relief, coins doux, ombre colorée --- */
.ppt-app .ppt-btn {
	min-height: 48px !important;
	padding: 12px 20px !important;
	background: var(--pp-teal) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 15px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	letter-spacing: 0.01em !important;
	box-shadow: 0 6px 16px rgba(29, 158, 58, 0.30) !important;
	transition: transform 0.08s ease, box-shadow 0.15s ease, opacity 0.15s ease !important;
}
.ppt-app .ppt-btn:active {
	transform: translateY(1px) scale(0.99) !important;
	box-shadow: 0 3px 9px rgba(29, 158, 58, 0.24) !important;
	opacity: 0.95 !important;
}

/* --- Bouton secondaire : teinté vert pâle, sans ombre --- */
.ppt-app .ppt-btn-secondaire {
	background: var(--pp-teal-pale) !important;
	color: var(--pp-teal-fonce) !important;
	box-shadow: none !important;
}
html.ppt-nuit .ppt-app .ppt-btn-secondaire {
	background: #243a2e !important;
	color: #7dd894 !important;
}

/* --- Bouton pleine largeur : plus haut, coins généreux --- */
.ppt-app .ppt-btn-large {
	width: 100% !important;
	min-height: 48px !important;
	border-radius: 999px !important;
	font-size: 16px !important;
}

/* --- Bouton mini (entêtes de carte, filtres) : compact, même ADN --- */
.ppt-app .ppt-btn-mini {
	min-height: 36px !important;
	padding: 6px 14px !important;
	font-size: 13px !important;
	border-radius: 999px !important;
	box-shadow: 0 2px 8px rgba(19, 88, 60, 0.20) !important;
}
.ppt-app .ppt-btn-mini.ppt-btn-secondaire { box-shadow: none !important; }

/* --- Bouton danger : rouge, même forme --- */
.ppt-app .ppt-btn-danger {
	background: var(--ppt-rouge) !important;
	box-shadow: 0 4px 14px rgba(192, 57, 43, 0.28) !important;
}

/* --- Bouton VERRE DÉPOLI : pour les fonds colorés (hero, etc.) --- */
/* (.ppt-btn-glass retiré : classe morte, aucun usage.) */

/* ═══ BARRE DE NAVIGATION : dégradé vert + verre dépoli ═══
   IMPORTANT : on ne touche PAS au positionnement (fixed, bottom,
   left/right, max-width, margin auto) défini plus haut — on ne
   change QUE l'apparence (couleur de fond, ombre douce vers le
   haut). Ajouter position:relative ici casserait le fixed et le
   centrage (barre qui défile et se décale). */
.ppt-app .ppt-nav,
.ppt-nav {
	background: var(--pp-degrade) !important;
	border-top: none !important;
	box-shadow: 0 -2px 12px rgba(19, 88, 60, 0.14) !important;
}
.ppt-app .ppt-nav-item { color: rgba(255, 255, 255, 0.72) !important; }
.ppt-app .ppt-nav-actif,
.ppt-app .ppt-nav-actif * { color: #fff !important; font-weight: 700 !important; }
.ppt-app .ppt-nav-icone { opacity: 0.95; }
html.ppt-nuit .ppt-app .ppt-nav,
html.ppt-nuit .ppt-nav {
	background: linear-gradient(140deg, #0f4a32 0%, var(--ppt-vert-fonce) 120%) !important;
}
html.ppt-nuit .ppt-app .ppt-nav-item { color: rgba(255, 255, 255, 0.6) !important; }
html.ppt-nuit .ppt-app .ppt-nav-actif,
html.ppt-nuit .ppt-app .ppt-nav-actif * { color: #fff !important; }

/* ============================================================
 * V3.42 — CORRECTION BOUTONS RÉCALCITRANTS + ICÔNES
 * ============================================================ */

/* .ppt-btn-mesure : juste centrer le texte et normaliser la taille.
   NE PAS forcer pleine largeur (ça faisait déborder certains boutons). */
.ppt-app .ppt-btn-mesure {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;
	min-height: 44px !important;
	padding: 10px 18px !important;
	font-size: 14px !important;
	border-radius: 999px !important;
	text-align: center !important;
	width: auto !important;
	max-width: 100% !important;
}
/* Sa variante mini (bouton IA dans une phrase) reste compacte mais centrée. */
.ppt-app .ppt-btn-mesure.ppt-btn-mini {
	min-height: 36px !important;
	font-size: 13px !important;
	padding: 6px 16px !important;
}
/* Le <p> qui enveloppe certains de ces boutons ne doit pas les rétrécir. */
.ppt-app p > .ppt-btn-mesure { margin-top: 10px !important; }

/* ─── PETITES ICÔNES D'ACTION (remplacent les boutons texte) ───
   Bouton compact carré pour Modifier (crayon) / Supprimer (corbeille)
   et autres actions de ligne. Gagne beaucoup de place dans les listes. */
.ppt-app .ppt-btn-icone {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 36px !important;
	min-width: 36px !important;
	height: 36px !important;
	min-height: 36px !important;
	padding: 0 !important;
	border-radius: 50% !important;
	font-size: 16px !important;
	line-height: 1 !important;
	background: var(--pp-teal-pale) !important;
	color: var(--pp-teal-fonce) !important;
	border: none !important;
	box-shadow: none !important;
	cursor: pointer;
}
.ppt-app .ppt-btn-icone:active { transform: scale(0.94); }
.ppt-app .ppt-btn-icone svg { width: 18px; height: 18px; }
html.ppt-nuit .ppt-app .ppt-btn-icone {
	background: #243a2e !important;
	color: #7dd894 !important;
}
/* (.ppt-btn-icone-danger retiré : classe morte, aucun usage.) */
/* Groupe d'icônes d'action alignées à droite d'une ligne. */
.ppt-app .ppt-actions-icones {
	display: inline-flex;
	gap: 6px;
	flex: 0 0 auto;
	align-items: center;
}

/* ============================================================
 * V3.42 — FILTRES DISCRETS (sur la ligne du titre de carte)
 * ============================================================
 * Une petite liste déroulante sans label, alignée à droite du
 * titre de la carte. La sélection filtre automatiquement (JS).
 * Un petit bouton rond « réinitialiser » (↻) sans texte à côté. */

/* Le titre de carte devient une ligne flex : titre à gauche,
   filtres à droite. */
.ppt-app .ppt-carte-titre-filtre {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 8px;
	flex-wrap: nowrap;
}
.ppt-app .ppt-carte-titre-filtre .ppt-titre-txt {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ppt-app .ppt-filtres-inline {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
}
/* La petite liste déroulante discrète. */
.ppt-app .ppt-filtre-puce {
	-webkit-appearance: none;
	appearance: none;
	min-height: 32px !important;
	max-width: 130px;
	padding: 5px 26px 5px 12px !important;
	font-size: 12.5px !important;
	font-weight: 600;
	color: var(--pp-teal-fonce) !important;
	background-color: var(--pp-teal-pale) !important;
	border: none !important;
	border-radius: 16px !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2313583C' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 10px center !important;
	cursor: pointer;
	text-overflow: ellipsis;
}
html.ppt-nuit .ppt-app .ppt-filtre-puce {
	background-color: #243a2e !important;
	color: #7dd894 !important;
	background-repeat: no-repeat !important;
	background-position: right 10px center !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237dd894' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}
/* Le petit bouton rond « réinitialiser » (icône seule, sans texte). */
.ppt-app .ppt-filtre-reset {
	display: none;   /* masqué tant qu'aucun filtre actif */
	align-items: center;
	justify-content: center;
	width: 32px; height: 32px;
	min-height: 32px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--pp-teal-pale);
	color: var(--pp-teal-fonce);
	font-size: 14px;
	cursor: pointer;
	line-height: 1;
}
.ppt-app .ppt-filtre-reset.actif { display: inline-flex; }
.ppt-app .ppt-filtre-reset:active { transform: rotate(-90deg); }
html.ppt-nuit .ppt-app .ppt-filtre-reset { background: #243a2e; color: #7dd894; }
/* Ligne masquée par un filtre. */
.ppt-app .ppt-filtre-cache { display: none !important; }

/* ============================================================
 * V3.43 — CORRECTIFS boutons & filtres (retours Victor)
 * ============================================================ */

/* Le <select> du filtre : forcer appearance:none EN NUIT AUSSI
   (sinon iOS affiche son rendu natif hachuré, illisible). */
.ppt-app .ppt-filtre-puce,
html.ppt-nuit .ppt-app .ppt-filtre-puce {
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
}
html.ppt-nuit .ppt-app .ppt-filtre-puce option {
	background: #1C1C1E;
	color: #F2F2F7;
}

/* Bouton imprimante : garder SEULEMENT l'icône, sans fond ni cadre. */
.ppt-app .ppt-doc-imprimer {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	color: var(--pp-teal-fonce) !important;
	min-height: 36px !important;
	height: 36px !important;
	width: 36px !important;
	min-width: 36px !important;
	padding: 0 !important;
	font-size: 16px !important;
	border-radius: 50% !important;
}
.ppt-app .ppt-doc-imprimer svg { width: 18px; height: 18px; }
/* Quand le bouton imprimer est aussi un bouton-icône (rangée de
   filtres), il prend le fond rond pâle pour s'aligner sur les
   autres icônes d'action (Réinitialiser, etc.). */
.ppt-app a.ppt-btn-icone.ppt-doc-imprimer,
.ppt-app button.ppt-btn-icone.ppt-doc-imprimer {
	background: var(--pp-teal-pale) !important;
}
html.ppt-nuit .ppt-app a.ppt-btn-icone.ppt-doc-imprimer,
html.ppt-nuit .ppt-app button.ppt-btn-icone.ppt-doc-imprimer {
	background: #243a2e !important;
}
html.ppt-nuit .ppt-app .ppt-doc-imprimer { color: #7dd894 !important; }

/* Bouton « Filtrer » → entonnoir seul : on remplace le texte par
   l'emoji directement dans le HTML (.ppt-btn-icone), voir PHP. */

/* ============================================================
 * V3.44 — CORRECTIFS boutons (retours images Victor)
 * ============================================================ */

/* Compteurs « ＋ Ventes » et « 12 📦 » : équilibrer la taille du
   grand caractère (+/chiffre) et du texte/icône à côté. Classe
   dédiée .ppt-compteur-action pour NE PAS toucher : ni le compteur
   signature (« 0 visites aujourd'hui » avec <br>), ni les cartes
   de statistiques (CA, Part, boîtes, taux). */
.ppt-app .ppt-compteurs > a.ppt-compteur-action {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 17px !important;
	font-weight: 600;
	line-height: 1.2;
}
.ppt-app .ppt-compteurs > a.ppt-compteur-action strong {
	font-size: 24px !important;
	font-weight: 800;
	margin: 0 !important;
	line-height: 1;
}

/* Imprimante : icône seule, jamais de fond ni de texte débordant.
   Renforcé pour battre toute combinaison de classes .ppt-btn*. */
.ppt-app a.ppt-doc-imprimer,
.ppt-app button.ppt-doc-imprimer {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	width: 36px !important;
	min-width: 36px !important;
	height: 36px !important;
	min-height: 36px !important;
	padding: 0 !important;
	font-size: 19px !important;
	overflow: visible !important;
	white-space: nowrap;
}

/* Raccourcis de période (Rapport : Cette semaine / Ce mois / Cette
   année) : des pilules compactes, pas des gros boutons pleine
   largeur. */
.ppt-app .ppt-raccourcis { gap: 8px; }
.ppt-app .ppt-raccourcis .ppt-btn {
	flex: 0 1 auto !important;
	width: auto !important;
	min-height: 36px !important;
	padding: 7px 16px !important;
	font-size: 13.5px !important;
	border-radius: 999px !important;
}

/* Boutons de filtre comptabilité (Afficher / Mois en cours) : un
   peu plus compacts, côte à côte, pas surdimensionnés. */
.ppt-app .ppt-compta-filtre-actions .ppt-btn {
	min-height: 42px !important;
	font-size: 14px !important;
	padding: 9px 14px !important;
}

/* ============================================================
 * V3.47 — LISIBILITÉ « Prix enregistrés » (gestionnaire stock)
 * ============================================================
 * Avant : produit + grossiste + PGHT + Cession collés en une
 * ligne de texte gris, illisible quand un produit revient sur
 * plusieurs grossistes. Après : le nom du produit en tête (une
 * fois), ses grossistes dessous, séparés par un filet fin, avec
 * les prix mis en exergue et alignés à droite. */
.ppt-app .ppt-prix-produit {
	padding: 12px 0 6px;
	border-bottom: 1px solid var(--pp-separateur);
}
.ppt-app .ppt-prix-produit:last-child { border-bottom: none; }
.ppt-app .ppt-prix-produit-nom {
	font-weight: 700;
	font-size: 15px;
	color: var(--pp-encre);
	margin-bottom: 6px;
}
.ppt-app .ppt-prix-ligne {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 5px 0 5px 10px;
	border-left: 2px solid var(--pp-teal-pale);
	margin-bottom: 4px;
}
.ppt-app .ppt-prix-grossiste {
	font-size: 13px;
	color: var(--pp-gris);
	flex: 0 0 auto;
	max-width: 40%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ppt-app .ppt-prix-valeurs {
	display: flex;
	gap: 14px;
	flex: 1 1 auto;
	justify-content: flex-end;
}
.ppt-app .ppt-prix-item {
	font-size: 13px;
	color: var(--pp-gris);
	white-space: nowrap;
}
.ppt-app .ppt-prix-label {
	font-size: 10.5px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	opacity: 0.75;
}
.ppt-app .ppt-prix-item strong {
	color: var(--pp-teal-fonce);
	font-size: 14px;
	font-weight: 700;
}
html.ppt-nuit .ppt-app .ppt-prix-ligne { border-left-color: #243a2e; }
html.ppt-nuit .ppt-app .ppt-prix-item strong { color: #7dd894; }
html.ppt-nuit .ppt-app .ppt-prix-produit-nom { color: #E5E5EA; }

/* Bloc « Ventes du mois par produit » : avant, « produit · N btes »
   + montant sur une seule ligne → le nom long débordait et cassait
   la ligne (« F » orphelin). Après : nom du produit sur sa ligne,
   puis boîtes à gauche / montant en exergue à droite, filet fin. */
.ppt-app .ppt-vente-produit {
	padding: 10px 0;
	border-bottom: 1px solid var(--pp-separateur);
}
.ppt-app .ppt-vente-produit:last-child { border-bottom: none; }
.ppt-app .ppt-vente-produit-nom {
	font-size: 14.5px;
	font-weight: 600;
	color: var(--pp-encre);
	margin-bottom: 3px;
	line-height: 1.3;
}
.ppt-app .ppt-vente-produit-infos {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}
.ppt-app .ppt-vente-qte {
	font-size: 12.5px;
	color: var(--pp-gris);
}
.ppt-app .ppt-vente-ca {
	font-size: 15px;
	font-weight: 700;
	color: var(--pp-teal-fonce);
	white-space: nowrap;
}
html.ppt-nuit .ppt-app .ppt-vente-produit-nom { color: #E5E5EA; }
html.ppt-nuit .ppt-app .ppt-vente-ca { color: #7dd894; }

/* ============================================================
 * V3.49 — Pagination client (terrain)
 * ============================================================ */
.ppt-app .pp-page-cache { display: none !important; }
.ppt-app .pp-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 12px 0 2px;
	flex-wrap: nowrap;
}
/* Petits boutons carrés compacts (chevron seul), pas de fond
   pleine largeur ni de grande hauteur. On surcharge .ppt-btn-mini. */
.ppt-app .pp-pagination .ppt-btn {
	flex: 0 0 auto;
	width: 34px !important;
	min-width: 34px !important;
	height: 34px !important;
	min-height: 34px !important;
	padding: 0 !important;
	font-size: 16px !important;
	line-height: 1 !important;
	border-radius: 10px !important;
	box-shadow: none !important;
}
.ppt-app .pp-pagination .ppt-btn:disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}
.ppt-app .pp-page-info {
	font-size: 12.5px;
	color: var(--pp-gris);
	text-align: center;
	flex: 0 1 auto;
	white-space: nowrap;
}

/* ============================================================
 * V3.50 — Actions de réponse du chat IA (copier / imprimer)
 * ============================================================ */
.ppt-app .pp-chat-actions {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px solid rgba(0,0,0,0.08);
}
.ppt-app .pp-chat-action {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--pp-teal-fonce);
	background: var(--pp-teal-pale);
	border: none;
	border-radius: 14px;
	cursor: pointer;
}
.ppt-app .pp-chat-action:active { transform: scale(0.96); }
html.ppt-nuit .ppt-app .pp-chat-actions { border-top-color: rgba(255,255,255,0.12); }
html.ppt-nuit .ppt-app .pp-chat-action { background: #243a2e; color: #7dd894; }

/* S'assurer que le bouton Envoyer du chat est bien visible au terrain. */
.ppt-app .pp-chat-saisie .button,
.ppt-app .pp-chat-saisie button,
.ppt-app .pp-chat-btn-envoyer {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	min-width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--pp-degrade);
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}
.ppt-app .pp-chat-btn-envoyer:disabled { opacity: 0.5; cursor: default; }
/* Version back-office (page Analyses hors terrain) : même bouton rond. */
.pp-chat-btn-envoyer {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--ppt-degrade);
	color: #fff;
	font-size: 22px;
	cursor: pointer;
}
.pp-chat-btn-envoyer:disabled { opacity: 0.5; cursor: default; }

/* ============================================================
 * V3.51 — color-scheme pour les contrôles natifs
 * ============================================================
 * Indique au navigateur quel jeu de couleurs natives utiliser
 * (menus déroulants, sélecteurs de date, barres de défilement),
 * pour qu'ils s'accordent au thème jour/nuit du CRM. */
html { color-scheme: light; }
html.ppt-nuit { color-scheme: dark; }


/* Filtre laboratoire au-dessus de la liste de produits (formulaire visite) */
.ppt-app .ppt-filtre-labo-produits {
	width: 100%;
	margin-bottom: 8px;
	padding: 10px;
	border-radius: 10px;
	border: 1px solid #c5d8cb;
	background: #f4faf6;
	font-size: 14px;
	-webkit-appearance: none;
	appearance: none;
}
html.ppt-nuit .ppt-app .ppt-filtre-labo-produits {
	background: #1A2530;
	color: #E7EDEB;
	border-color: #3A4A55;
}

/* ============================================================
 * Switch Centres / Personnes (écran clients terrain)
 * ============================================================ */
.ppt-app .ppt-switch-vue {
	display: flex;
	gap: 0;
	background: #eef4f0;
	border-radius: 12px;
	padding: 4px;
	margin: 10px 0 14px;
}
.ppt-app .ppt-switch-option {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-align: center;
	padding: 9px 12px;
	border-radius: 9px;
	font-size: 14px;
	font-weight: 600;
	color: var(--ppt-vert-fonce);
	text-decoration: none;
}
.ppt-app .ppt-switch-actif {
	background: #fff;
	color: var(--ppt-vert-fonce);
	box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
html.ppt-nuit .ppt-app .ppt-switch-vue { background: #1a2a20; }
html.ppt-nuit .ppt-app .ppt-switch-option { color: #7dd894; }
.ppt-app .ppt-switch-option svg { width: 16px; height: 16px; flex: 0 0 auto; }
html.ppt-nuit .ppt-app .ppt-switch-actif { background: #23303C; color: #7dd894; }

/* Label + filtre sur la même ligne (ex. « Produits présentés » + labo) */
.ppt-app .ppt-label-filtre {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 6px;
}
.ppt-app .ppt-label-filtre label { margin: 0; }
.ppt-app .ppt-label-filtre .ppt-filtre-labo-produits {
	width: auto;
	min-width: 130px;
	max-width: 55%;
	margin: 0;
	padding: 6px 10px;
	font-size: 13px;
	border-radius: 999px;
	background: #e4f4e9;
	color: var(--ppt-vert-fonce);
	border: 1px solid #c5d8cb;
}
html.ppt-nuit .ppt-app .ppt-label-filtre .ppt-filtre-labo-produits {
	background: #1e3a2a; color: #7dd894; border-color: #2f5a41;
}

/* Input date pleine largeur (corrige l'excentrage sur iOS) */
.ppt-app .ppt-input-pleine {
	width: 100%;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
}

/* Harmoniser les boutons Afficher / Mois en cours (compta terrain) */
.ppt-app .ppt-compta-filtre-actions {
	display: flex;
	gap: 8px;
	align-items: stretch;
}
.ppt-app .ppt-compta-filtre-actions .ppt-btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	box-sizing: border-box;
	margin: 0;
}

/* Boutons Prévisualiser / Actualiser (Messages terrain) à même hauteur */
.ppt-app .pp-messages-actions {
	display: flex;
	gap: 8px;
	align-items: stretch;
}
.ppt-app .pp-messages-actions > * {
	height: 52px;
	min-height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	margin: 0;
	padding-top: 0;
	padding-bottom: 0;
}
.ppt-app .pp-messages-actions .pp-btn-reset {
	flex: 0 0 auto;
	width: 52px;
	padding: 0;
}

/* ============================================================
 * Commandes en cours : ligne compacte + icônes + panneau
 * ============================================================ */
.ppt-app .ppt-cde {
	padding: 12px 0;
	border-bottom: 1px solid rgba(0,0,0,0.08);
}
html.ppt-nuit .ppt-app .ppt-cde { border-bottom-color: rgba(255,255,255,0.08); }
.ppt-app .ppt-cde:last-child { border-bottom: none; }

.ppt-app .ppt-cde-ligne {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}
.ppt-app .ppt-cde-infos { flex: 1; min-width: 0; }
.ppt-app .ppt-cde-infos strong { display: block; }
.ppt-app .ppt-cde-infos small { color: var(--pp-gris); }

/* Les deux petites icônes, alignées à l'extrémité droite. */
.ppt-app .ppt-cde-icones {
	flex: 0 0 auto;
	display: flex;
	gap: 6px;
}
.ppt-app .ppt-cde-icone {
	width: 38px;
	height: 38px;
	border: 1px solid #c5d8cb;
	border-radius: 10px;
	background: #f4faf6;
	font-size: 17px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}
.ppt-app .ppt-cde-icone-actif {
	background: var(--pp-degrade);
	border-color: transparent;
}
html.ppt-nuit .ppt-app .ppt-cde-icone {
	background: #1A2530; border-color: #3A4A55;
}

/* Le panneau dépliant : pleine largeur, sous la ligne. */
.ppt-app .ppt-cde-panneau {
	margin-top: 10px;
	padding: 12px;
	background: #f4faf6;
	border: 1px solid #d7e6dc;
	border-radius: 12px;
}
html.ppt-nuit .ppt-app .ppt-cde-panneau {
	background: #1A2530; border-color: #3A4A55;
}
.ppt-app .ppt-cde-form { display: block; }
.ppt-app .ppt-cde-form label {
	display: block;
	margin: 8px 0 4px;
	font-size: 13px;
	font-weight: 600;
}
.ppt-app .ppt-cde-form label:first-child { margin-top: 0; }
.ppt-app .ppt-cde-form .ppt-input-pleine {
	width: 100%;
	box-sizing: border-box;
	padding: 10px;
	border-radius: 10px;
	border: 1px solid #c5d8cb;
	font-size: 15px;
	-webkit-appearance: none;
	appearance: none;
	background: #fff;
}
html.ppt-nuit .ppt-app .ppt-cde-form .ppt-input-pleine {
	background: #23303C; color: #E7EDEB; border-color: #3A4A55;
}
.ppt-app .ppt-cde-form .ppt-btn {
	width: 100%;
	margin-top: 12px;
	min-height: 46px;
}

/* Boutons d'action des visites planifiées (icônes équilibrées) */
.ppt-app .ppt-btn-icone-vert {
	background: var(--pp-degrade);
	border-color: transparent;
}
/* (.ppt-btn-suppr-visite retiré : classe morte, aucun usage.) */

/* Titre de section (Centres · N / Personnes · N) */
.ppt-app .ppt-section-titre {
	font-size: 15px;
	margin: 14px 0 10px;
}
/* Bouton « Ajouter » compact sous la recherche */
.ppt-app .ppt-btn-ajouter-liste {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	width: auto !important;
	max-width: max-content;
	min-height: 36px !important;
	margin: 8px 0 4px !important;
	padding: 6px 16px !important;
	font-size: 13px !important;
	border-radius: 999px !important;
}
.ppt-app .ppt-btn-ajouter-liste svg { width: 16px; height: 16px; }
/* Ligne personne : nom + actions, le panneau de modif dessous */
.ppt-app .ppt-client { flex-wrap: wrap; }
.ppt-app .ppt-client-nom { flex: 1; min-width: 0; }
.ppt-app .ppt-client .ppt-cde-panneau { flex-basis: 100%; }

/* Rubrique de visite obligatoire non remplie (au submit) */
.ppt-app .ppt-rub-repli.ppt-rub-erreur {
	border: 1px solid #e6b4af;
	border-radius: 12px;
	background: #fdf2f1;
}
html.ppt-nuit .ppt-app .ppt-rub-repli.ppt-rub-erreur {
	background: #3a2020;
	border-color: #6b3a3a;
}

/* Champ simple (date de relance) en erreur au submit */
.ppt-app .ppt-champ-erreur {
	border: 1px solid var(--ppt-rouge) !important;
	background: #fdf2f1 !important;
}
html.ppt-nuit .ppt-app .ppt-champ-erreur {
	background: #3a2020 !important;
	border-color: var(--ppt-rouge) !important;
}

/* ============================================================
 * PILOTAGE (tableau de bord superviseur)
 * ============================================================ */
/* Switch à 3 options : chaque option prend un tiers */
.ppt-app .ppt-switch-3 .ppt-switch-option { flex: 1; text-align: center; font-size: 13px; }

/* Pastille de comptage dans le switch (non-lues) */
.ppt-app .ppt-pastille-nb {
	display: inline-block;
	min-width: 18px;
	padding: 0 5px;
	margin-left: 4px;
	background: var(--ppt-rouge);
	color: #fff;
	border-radius: 9px;
	font-size: 11px;
	line-height: 18px;
	text-align: center;
	vertical-align: middle;
}

/* Entête du flux : compteur + bouton tout lire */
.ppt-app .ppt-flux-entete {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 10px 0;
	padding: 8px 12px;
	background: #e4f4e9;
	border-radius: 10px;
	font-size: 14px;
}
html.ppt-nuit .ppt-app .ppt-flux-entete { background: #1A2530; }

/* Une visite dans le flux */
.ppt-app .ppt-flux-visite {
	border-bottom: 1px solid rgba(0,0,0,0.08);
	padding: 10px 0;
}
html.ppt-nuit .ppt-app .ppt-flux-visite { border-bottom-color: rgba(255,255,255,0.08); }
.ppt-app .ppt-flux-visite > summary {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	list-style: none;
}
.ppt-app .ppt-flux-visite > summary::-webkit-details-marker { display: none; }
.ppt-app .ppt-flux-client { flex: 1; font-weight: 600; }
.ppt-app .ppt-flux-meta { color: var(--pp-gris); font-size: 12px; }

/* La pastille verte « non lu » (façon WhatsApp) */
.ppt-app .ppt-pastille-non-lu {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--pp-vert-vif, #1D9E3A);
	flex: 0 0 auto;
	vertical-align: middle;
}
.ppt-app .ppt-flux-non-lu .ppt-flux-client { font-weight: 700; }

.ppt-app .ppt-flux-detail { padding: 10px 0 4px; font-size: 14px; }
.ppt-app .ppt-flux-detail p { margin: 6px 0; }
.ppt-app .ppt-marquer-lue {
	display: inline-block;
	margin-bottom: 8px;
	font-size: 13px;
	color: var(--pp-vert-vif, #1D9E3A);
	font-weight: 600;
}

/* Éléments épinglables dans le détail */
.ppt-app .ppt-epingle-item {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin: 0 6px 4px 0;
	padding: 2px 4px 2px 10px;
	background: #f4faf6;
	border: 1px solid #d7e6dc;
	border-radius: 14px;
	font-size: 13px;
}
html.ppt-nuit .ppt-app .ppt-epingle-item { background: #1A2530; border-color: #3A4A55; }
.ppt-app .ppt-epingle-form { display: inline; margin: 0; }
.ppt-app .ppt-epingle-btn {
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 14px;
	padding: 2px 4px;
	line-height: 1;
}

/* Cartes d'épingles */
.ppt-app .ppt-epingle-carte {
	position: relative;
	margin: 8px 0;
	padding: 12px 44px 12px 14px;
	background: #fff;
	border: 1px solid #d7e6dc;
	border-radius: 12px;
}
html.ppt-nuit .ppt-app .ppt-epingle-carte { background: #23303C; border-color: #3A4A55; }
.ppt-app .ppt-epingle-contenu { font-weight: 600; }
.ppt-app .ppt-epingle-source { color: var(--pp-gris); font-size: 12px; margin-top: 4px; }
.ppt-app .ppt-epingle-note { font-size: 13px; margin-top: 6px; }
.ppt-app .ppt-epingle-carte .ppt-btn-icone {
	position: absolute;
	top: 10px;
	right: 10px;
}

/* Statistiques */
.ppt-app .ppt-stats-form label {
	display: block;
	margin: 8px 0 4px;
	font-size: 13px;
	font-weight: 600;
}
.ppt-app .ppt-stats-scroll { overflow-x: auto; margin: 12px 0; }
.ppt-app .ppt-stats-table {
	border-collapse: collapse;
	width: 100%;
	font-size: 13px;
}
.ppt-app .ppt-stats-table th,
.ppt-app .ppt-stats-table td {
	border: 1px solid #d7e6dc;
	padding: 6px 8px;
	text-align: center;
	white-space: nowrap;
}
html.ppt-nuit .ppt-app .ppt-stats-table th,
html.ppt-nuit .ppt-app .ppt-stats-table td { border-color: #3A4A55; }
.ppt-app .ppt-stats-table thead th { background: var(--pp-degrade); color: #fff; }
.ppt-app .ppt-stats-table tbody th { text-align: left; background: #f4faf6; }
html.ppt-nuit .ppt-app .ppt-stats-table tbody th { background: #1A2530; }
.ppt-app .ppt-stats-cell-actif { background: #e4f4e9; font-weight: 600; }
html.ppt-nuit .ppt-app .ppt-stats-cell-actif { background: #21402c; }
.ppt-app .ppt-stats-total { font-weight: 700; }
.ppt-app .ppt-stats-ligne-total td,
.ppt-app .ppt-stats-ligne-total th { background: #eef6f0; font-weight: 700; }
html.ppt-nuit .ppt-app .ppt-stats-ligne-total td,
html.ppt-nuit .ppt-app .ppt-stats-ligne-total th { background: #1f2c25; }

/* Total par critère (barres) */
.ppt-app .ppt-totaux-liste { margin: 8px 0; }
.ppt-app .ppt-total-ligne {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 6px 0;
}
.ppt-app .ppt-total-label { flex: 0 0 40%; font-size: 13px; }
.ppt-app .ppt-total-barre {
	flex: 1;
	height: 14px;
	background: #eef2f0;
	border-radius: 7px;
	overflow: hidden;
}
html.ppt-nuit .ppt-app .ppt-total-barre { background: #1A2530; }
.ppt-app .ppt-total-remplissage {
	display: block;
	height: 100%;
	background: var(--pp-degrade);
}
.ppt-app .ppt-total-nb { flex: 0 0 auto; font-weight: 700; font-size: 13px; min-width: 24px; text-align: right; }

/* ============================================================
 * PILOTAGE — raffinements (fusion flux, stats cliquables)
 * ============================================================ */
/* Filtre actif venu des statistiques (bandeau au-dessus du flux) */
.ppt-app .ppt-flux-filtre-actif {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 10px 0;
	padding: 8px 12px;
	background: #fff7e6;
	border: 1px solid #e0c56a;
	border-radius: 10px;
	font-size: 13px;
}
html.ppt-nuit .ppt-app .ppt-flux-filtre-actif { background: #332d1a; border-color: #6b5a2a; }
.ppt-app .ppt-flux-filtre-actif a { font-weight: 600; white-space: nowrap; }

/* Ligne de rubrique dans le détail : texte + 📌 sur la même ligne */
.ppt-app .ppt-rub-ligne { line-height: 2; }
.ppt-app .ppt-rub-ligne .ppt-epingle-item {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin: 0 4px 4px 0;
	padding: 1px 4px 1px 8px;
	background: #f4faf6;
	border: 1px solid #d7e6dc;
	border-radius: 12px;
	font-size: 13px;
}
html.ppt-nuit .ppt-app .ppt-rub-ligne .ppt-epingle-item { background: #1A2530; border-color: #3A4A55; }

/* Chiffres cliquables du tableau croisé */
.ppt-app .ppt-stats-lien {
	display: block;
	font-weight: 700;
	text-decoration: none;
	color: var(--pp-vert-fonce, var(--ppt-vert-fonce));
}
html.ppt-nuit .ppt-app .ppt-stats-lien { color: #7dd894; }
.ppt-app .ppt-stats-lien:hover { text-decoration: underline; }

/* Menus de critères accrochés au tableau (coins, façon tableur) */
.ppt-app .ppt-stats-coin {
	background: #eef6f0 !important;
	padding: 4px !important;
	min-width: 130px;
}
html.ppt-nuit .ppt-app .ppt-stats-coin { background: #1f2c25 !important; }
.ppt-app .ppt-stats-coin .ppt-stats-select {
	width: 100%;
	max-width: 150px;
	font-size: 11px;
	padding: 3px 4px;
	border-radius: 6px;
	border: 1px solid #b8ccbf;
	background: #fff;
	-webkit-appearance: none;
	appearance: none;
}
html.ppt-nuit .ppt-app .ppt-stats-coin .ppt-stats-select { background: #23303C; color: #E7EDEB; border-color: #3A4A55; }
.ppt-app .ppt-stats-coin-bas { border-top: none !important; }
.ppt-app .ppt-stats-coin-vide { background: transparent !important; border: none !important; }

/* Menus affichés hors tableau (cas « pas de données ») */
.ppt-app .ppt-stats-menus { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.ppt-app .ppt-stats-menu-bloc { display: flex; flex-direction: column; gap: 4px; }
.ppt-app .ppt-stats-menu-label { font-size: 12px; font-weight: 600; }

/* Barre du total par critère : rendue cliquable */
.ppt-app a.ppt-total-lien { text-decoration: none; color: inherit; cursor: pointer; }
.ppt-app a.ppt-total-lien:hover .ppt-total-remplissage { opacity: 0.8; }
.ppt-app a.ppt-total-lien:hover .ppt-total-label { text-decoration: underline; }

/* Mention du superviseur cliquable (délégué) : le commentaire ouvre le détail */
.ppt-app .ppt-mention-toggle { margin-top: 6px; }
.ppt-app .ppt-mention-toggle > summary {
	cursor: pointer;
	list-style: none;
	padding: 6px 8px;
	background: #eef6f0;
	border-radius: 8px;
}
html.ppt-nuit .ppt-app .ppt-mention-toggle > summary { background: #1f2c25; }
.ppt-app .ppt-mention-toggle > summary::-webkit-details-marker { display: none; }
.ppt-app .ppt-mention-toggle > summary::after {
	content: ' ▸';
	color: var(--pp-gris);
	font-size: 12px;
}
.ppt-app .ppt-mention-toggle[open] > summary::after { content: ' ▾'; }

/* Point 11 : rubrique avec 📌 unique aligné à droite (pas de retour ligne) */
.ppt-app .ppt-rub-epingle {
	display: flex !important;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin: 6px 0;
}
.ppt-app .ppt-rub-epingle .ppt-rub-texte { flex: 1 1 auto; min-width: 0; }
.ppt-app .ppt-rub-epingle .ppt-epingle-btn {
	flex: 0 0 auto;
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 15px;
	padding: 0 2px;
	line-height: 1.4;
}
/* Le mini-formulaire d'épingle ne casse plus la ligne */
.ppt-app .ppt-rub-epingle .ppt-epingle-form { display: inline-block; margin: 0; flex: 0 0 auto; }

/* Point 5 : petit pin de localisation discret à côté du nom du centre */
.ppt-app .ppt-geo-mini {
	font-size: 12px;
	text-decoration: none;
	opacity: 0.7;
	margin-left: 2px;
	vertical-align: baseline;
}
.ppt-app .ppt-geo-mini:hover { opacity: 1; }

/* Point 2 : distinguer visuellement les visites planifiées en retard vs à faire */
.ppt-app .ppt-visite-retard {
	border-left: 3px solid var(--ppt-rouge);
	padding-left: 10px;
	background: rgba(217, 83, 79, 0.05);
	box-sizing: border-box;
	width: 100%;
}
.ppt-app .ppt-visite-afaire {
	border-left: 3px solid var(--pp-vert-vif, #1D9E3A);
	padding-left: 10px;
	box-sizing: border-box;
	width: 100%;
}
html.ppt-nuit .ppt-app .ppt-visite-retard { background: rgba(217, 83, 79, 0.12); }

/* Point 14 : historique des visites d'un centre */
.ppt-app .ppt-historique-centre { margin-top: 6px; }
.ppt-app .ppt-historique-centre > summary {
	cursor: pointer;
	font-size: 13px;
	color: var(--pp-vert-fonce, var(--ppt-vert-fonce));
	font-weight: 600;
	list-style: none;
	display: inline-block;
	padding: 2px 0;
}
html.ppt-nuit .ppt-app .ppt-historique-centre > summary { color: #7dd894; }
.ppt-app .ppt-historique-centre > summary::-webkit-details-marker { display: none; }
.ppt-app .ppt-historique-corps { padding: 6px 0 4px 8px; border-left: 2px solid rgba(0,0,0,0.08); margin-top: 6px; }
html.ppt-nuit .ppt-app .ppt-historique-corps { border-left-color: rgba(255,255,255,0.12); }
.ppt-app .ppt-histo-visite { padding: 4px 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
html.ppt-nuit .ppt-app .ppt-histo-visite { border-bottom-color: rgba(255,255,255,0.08); }
.ppt-app .ppt-histo-visite > summary {
	cursor: pointer;
	font-size: 13px;
	list-style: none;
}
.ppt-app .ppt-histo-visite > summary::-webkit-details-marker { display: none; }
.ppt-app .ppt-histo-date { font-weight: 600; }

/* ============================================================
 * POINT 4 : refonte pro des filtres du Pilotage
 * ============================================================ */
/* Le bloc dépliable des filtres : encadré aéré */
.ppt-app .ppt-filtres-repli {
	background: #f6f9f7;
	border: 1px solid #e0e8e3;
	border-radius: 12px;
	margin-bottom: 12px;
	overflow: hidden;
}
html.ppt-nuit .ppt-app .ppt-filtres-repli { background: #1a2530; border-color: #3a4a55; }
.ppt-app .ppt-filtres-repli > summary {
	cursor: pointer;
	padding: 12px 14px;
	font-weight: 600;
	font-size: 14px;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 8px;
}
.ppt-app .ppt-filtres-repli > summary::-webkit-details-marker { display: none; }
.ppt-app .ppt-filtres-repli > summary::after {
	content: '▸';
	margin-left: auto;
	color: var(--pp-gris);
	transition: transform 0.2s;
}
.ppt-app .ppt-filtres-repli[open] > summary::after { content: '▾'; }
.ppt-app .ppt-filtres-repli .ppt-form-filtres {
	padding: 0 14px 14px;
}

/* La grille des champs : 2 colonnes propres, espacées */
.ppt-app .ppt-filtres-grille {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 12px;
}
.ppt-app .ppt-filtres-grille label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	color: var(--pp-gris);
	margin: 0;
}
.ppt-app .ppt-filtres-grille input,
.ppt-app .ppt-filtres-grille select {
	width: 100%;
	min-height: 40px;
	box-sizing: border-box;
	border: 1px solid #cdd8d1;
	border-radius: 9px;
	padding: 6px 10px;
	font-size: 14px;
	background: #fff;
}
/* Les champs date : hauteur fixe, pas de rendu natif géant iOS */
.ppt-app .ppt-filtres-grille input[type="date"],
.ppt-app .ppt-filtres-grille input[type="month"] {
	height: 40px;
	min-height: 40px;
	max-height: 40px;
	line-height: 1.2;
	-webkit-appearance: none;
	appearance: none;
	display: block;
	text-align: left;
}
.ppt-app .ppt-filtres-grille input[type="date"]::-webkit-date-and-time-value {
	text-align: left;
	margin: 0;
}
.ppt-app .ppt-filtres-grille input[type="date"]::-webkit-calendar-picker-indicator {
	margin: 0;
	padding: 0;
}
html.ppt-nuit .ppt-app .ppt-filtres-grille input,
html.ppt-nuit .ppt-app .ppt-filtres-grille select {
	background: #23303c;
	color: #e7edeb;
	border-color: #3a4a55;
}
/* Les deux champs date occupent chacun une demi-largeur, alignés */
.ppt-app .ppt-filtres-grille label:nth-child(1),
.ppt-app .ppt-filtres-grille label:nth-child(2) { grid-column: span 1; }
/* Les selects (client, praticien, zone, délégué) sur toute la largeur */
.ppt-app .ppt-filtres-grille select { grid-column: 1 / -1; }

/* La barre d'actions des filtres : boutons alignés à droite, aérés */
.ppt-app .ppt-filtres-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: flex-end;
	padding-top: 4px;
	border-top: 1px solid #e6ede9;
	margin-top: 4px;
}
html.ppt-nuit .ppt-app .ppt-filtres-actions { border-top-color: #3a4a55; }
.ppt-app .ppt-filtres-actions .ppt-btn-icone {
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 9px;
	background: #fff;
	border: 1px solid #cdd8d1;
}
html.ppt-nuit .ppt-app .ppt-filtres-actions .ppt-btn-icone {
	background: #23303c;
	border-color: #3a4a55;
}

/* Point 13 : champ de recherche au-dessus des listes déroulantes longues */
.ppt-app .ppt-combo-input {
	width: 100%;
	box-sizing: border-box;
	min-height: 44px;
	padding: 11px 14px;
	border: 1px solid var(--pp-separateur);
	border-radius: var(--pp-rayon-sm);
	font-size: 16px;
	color: var(--pp-encre);
	background: var(--pp-carte);
}
html.ppt-nuit .ppt-app .ppt-combo-input {
	background: var(--pp-carte);
	color: var(--pp-encre);
	border-color: var(--pp-separateur);
}

/* ============================================================
 * COMPOSANT SWIPE (façon Dictaphone/iOS)
 * ------------------------------------------------------------
 * Une rangée .ppt-swipe : le contenu visible .ppt-swipe-contenu
 * glisse vers la gauche pour révéler .ppt-swipe-actions (cachées
 * à droite, derrière le contenu). Réutilisable pour clients,
 * personnes, commandes.
 * ============================================================ */
.ppt-app .ppt-swipe {
	position: relative;
	overflow: hidden;
	border-bottom: 1px solid var(--ppt-bord, rgba(0,0,0,0.08));
	touch-action: pan-y; /* laisse le scroll vertical, on gère l'horizontal */
}
html.ppt-nuit .ppt-app .ppt-swipe { border-bottom-color: rgba(255,255,255,0.08); }

/* Les actions cachées, à droite, derrière le contenu */
.ppt-app .ppt-swipe-actions {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	display: flex;
	align-items: stretch;
	z-index: 1;
}
.ppt-app .ppt-swipe-actions > * {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 66px;
	height: 100%;
	border: none;
	color: #fff;
	font-size: 20px;
	text-decoration: none;
	cursor: pointer;
	box-sizing: border-box;
}
/* Couleurs des actions */
.ppt-app .ppt-swipe-act-histo   { background: #4b6b8a; }
.ppt-app .ppt-swipe-act-modifier { background: var(--ppt-vert); }
.ppt-app .ppt-swipe-act-tel     { background: var(--ppt-vert-fonce); }
.ppt-app .ppt-swipe-act-suppr   { background: var(--ppt-rouge); }

/* Le contenu visible qui glisse par-dessus les actions */
.ppt-app .ppt-swipe-contenu {
	position: relative;
	z-index: 2;
	background: var(--pp-carte, #fff);
	transform: translateX(0);
	transition: transform 0.25s ease;
	padding: 12px 0;
	will-change: transform;
}

/* Quand ouvert : le contenu est décalé vers la gauche (JS pose la classe) */
.ppt-app .ppt-swipe.ppt-swipe-ouvert .ppt-swipe-contenu { transform: translateX(var(--ppt-swipe-largeur, -132px)); }

/* Indice visuel discret qu'on peut swiper (petit chevron) */
.ppt-app .ppt-swipe-contenu::after {
	content: none;
	display: none;
	/* remplacé par le bouton .ppt-swipe-chevron
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--ppt-gris, #9aa);
	font-size: 18px;
	opacity: 0.35;
	pointer-events: none;
	transition: opacity 0.2s;
}
.ppt-app .ppt-swipe.ppt-swipe-ouvert .ppt-swipe-contenu::after { opacity: 0; }

/* Le contenu client à l'intérieur : 2 lignes propres */
.ppt-app .ppt-swipe-l1 {
	display: flex;
	align-items: center;
	gap: 8px;
}
.ppt-app .ppt-swipe-l1 .ppt-swipe-nom {
	flex: 1 1 auto;
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}
.ppt-app .ppt-swipe-l1 .ppt-badge { flex: 0 0 auto; }
.ppt-app .ppt-swipe-l2 {
	margin-top: 3px;
	color: var(--ppt-gris);
	font-size: 13px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ============================================================
 * COMPOSANT SWIPE (façon Dictaphone iOS / Finances 29)
 * ------------------------------------------------------------
 * Une rangée .ppt-swipe contient :
 *   - .ppt-swipe-actions : les boutons cachés DERRIÈRE, à droite
 *   - .ppt-swipe-contenu : la carte visible qui GLISSE vers la
 *     gauche pour révéler les actions.
 * Le glissement est piloté par le JS (translateX), avec un rappel
 * CSS (transition) pour un mouvement fluide.
 * ============================================================ */
.ppt-app .ppt-swipe {
	position: relative;
	overflow: hidden;
	border-bottom: 1px solid var(--ppt-bord, #e0e5e2);
	touch-action: pan-y; /* autorise le scroll vertical, on gère l'horizontal */
}
/* Les actions cachées derrière, alignées à droite. */
.ppt-app .ppt-swipe-actions {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	display: flex;
	align-items: stretch;
	z-index: 1;
}
.ppt-app .ppt-swipe-actions .ppt-swipe-act {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	width: 72px;
	padding: 0 2px;
	box-sizing: border-box;
	border: none;
	color: #fff;
	font-size: 11px;
	line-height: 1.1;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
}
.ppt-app .ppt-swipe-act-icone { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.ppt-app .ppt-swipe-act-icone svg { width: 18px; height: 18px; }
/* SVG directement dans un bouton swipe (sans span .ppt-swipe-act-icone). */
.ppt-app .ppt-swipe-actions .ppt-swipe-act > svg { width: 20px; height: 20px; }
.ppt-app .ppt-swipe-act-histo    { background: #4b6b8a; }
.ppt-app .ppt-swipe-act-modifier { background: var(--ppt-vert); }
.ppt-app .ppt-swipe-act-tel      { background: var(--ppt-vert-fonce); }
.ppt-app .ppt-swipe-act-suppr    { background: var(--ppt-rouge); }

/* La carte visible, qui glisse par-dessus les actions. */
.ppt-app .ppt-swipe-contenu {
	position: relative;
	z-index: 2;
	background: var(--pp-carte, #fff);
	padding: 12px 4px;
	transform: translateX(0);
	transition: transform 0.25s ease;
	will-change: transform;
}

/* Quand la rangée est ouverte, la carte est décalée à gauche. */
.ppt-app .ppt-swipe.ppt-swipe-ouvert .ppt-swipe-contenu {
	transform: translateX(var(--ppt-swipe-largeur, -132px));
}

/* ── INDICE DE SWIPE ─────────────────────────────────────────
   Au premier affichage d'une liste, la 1re rangée s'entrouvre
   brièvement puis se referme : ça montre au délégué qu'on peut
   faire glisser la ligne vers la gauche pour révéler des actions.
   Déclenché par JS (classe .ppt-swipe-indice), une seule fois. */
.ppt-app .ppt-swipe-indice .ppt-swipe-contenu {
	animation: ppt-swipe-indice-anim 1.15s ease 0.35s 1;
}
@keyframes ppt-swipe-indice-anim {
	0%   { transform: translateX(0); }
	28%  { transform: translateX(-52px); }
	52%  { transform: translateX(-32px); }
	76%  { transform: translateX(-52px); }
	100% { transform: translateX(0); }
}
/* Respect des préférences d'accessibilité : pas d'animation si
   l'utilisateur a demandé à réduire les mouvements. */
@media (prefers-reduced-motion: reduce) {
	.ppt-app .ppt-swipe-indice .ppt-swipe-contenu { animation: none; }
}

/* Les deux lignes visibles de la carte client. */
.ppt-app .ppt-swipe-l1 {
	display: flex;
	align-items: center;
	gap: 8px;
}
.ppt-app .ppt-swipe-l1 .ppt-swipe-nom {
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
	flex: 0 1 auto;
}
.ppt-app .ppt-swipe-l1 .ppt-badge { flex: 0 0 auto; }
.ppt-app .ppt-swipe-l2 {
	color: var(--ppt-gris, #8a9a91);
	font-size: 13px;
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
/* Petit indice visuel qu'on peut swiper : chevron discret. */
.ppt-app .ppt-swipe-contenu::after {
	content: none;
	display: none;
	/* remplacé par le bouton .ppt-swipe-chevron
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--ppt-gris, #b8c4bd);
	font-size: 18px;
	opacity: 0.4;
	pointer-events: none;
}
.ppt-app .ppt-swipe.ppt-swipe-ouvert .ppt-swipe-contenu::after { opacity: 0; }

/* Le formulaire « Modifier » se déplie SOUS la carte (pas plein écran). */
/* Le summary est masqué (on ouvre via l'action swipe). */
.ppt-app .ppt-swipe-edit > summary {
	display: none !important;
	list-style: none;
}
.ppt-app .ppt-swipe-edit > summary::-webkit-details-marker { display: none; }
/* Fermé : le <details> n'occupe aucune place (pas de ligne fantôme). */
.ppt-app .ppt-swipe-edit:not([open]) {
	background: transparent;
	border: none;
	height: 0;
	overflow: hidden;
}
/* Ouvert : le formulaire se déplie sous la carte, avec son fond. */
.ppt-app .ppt-swipe-edit[open] {
	background: var(--pp-carte, #f6f9f7);
	border-top: 1px solid var(--pp-separateur, #e0e5e2);
	margin-top: 8px;
}
.ppt-app .ppt-swipe-edit .ppt-form { padding: 12px; }
/* Idem pour la zone d'historique : rien quand cachée. */
.ppt-app .ppt-swipe-histo-zone[hidden] { display: none; }

/* ============================================================
 * COMBOBOX MAISON (champ unique + liste déroulante filtrable)
 * ============================================================ */
.ppt-app .ppt-combo { position: relative; width: 100%; }
/* Flèche à droite, identique à celle des <select> natifs, pour que
   le combobox maison soit visuellement indistinguable d'un select. */
.ppt-app .ppt-combo::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 14px;
	width: 12px;
	height: 8px;
	transform: translateY(-50%);
	pointer-events: none;
	z-index: 3;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238E8E93' d='M6 8L0 2l1.4-1.4L6 5.2 10.6.6 12 2z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: 12px 8px;
}
/* On réserve la place de la flèche dans le champ. */
.ppt-app .ppt-combo .ppt-combo-input { padding-right: 36px; }
/* Focus identique aux inputs/selects (bordure verte + halo). */
.ppt-app .ppt-combo-input:focus {
	outline: none;
	border-color: var(--pp-teal) !important;
	box-shadow: 0 0 0 3px rgba(29, 158, 58, 0.12) !important;
}
.ppt-app .ppt-combo-input {
	position: relative;
	z-index: 2;
	width: 100%;
	box-sizing: border-box;
	min-height: 44px;
	padding: 11px 14px;
	border: 1px solid var(--pp-separateur);
	border-radius: var(--pp-rayon-sm);
	font-size: 16px;
	color: var(--pp-encre);
	background: var(--pp-carte);
	-webkit-appearance: none;
	appearance: none;
}
html.ppt-nuit .ppt-app .ppt-combo-input {
	background: var(--pp-carte);
	color: var(--pp-encre);
	border-color: var(--pp-separateur);
}
/* La liste déroulante, en overlay sous le champ. */
.ppt-app .ppt-combo-liste {
	position: absolute;
	top: calc(100% + 2px);
	left: 0;
	right: 0;
	z-index: 50;
	max-height: 240px;
	overflow-y: auto;
	background: var(--pp-carte, #fff);
	border: 1px solid #cdd8d1;
	border-radius: 9px;
	box-shadow: 0 6px 18px rgba(0,0,0,0.18);
	-webkit-overflow-scrolling: touch;
}
html.ppt-nuit .ppt-app .ppt-combo-liste {
	background: #1C1C1E;
	border-color: #3a4a55;
}
.ppt-app .ppt-combo-option {
	padding: 11px 12px;
	font-size: 15px;
	cursor: pointer;
	border-bottom: 1px solid rgba(0,0,0,0.05);
}
html.ppt-nuit .ppt-app .ppt-combo-option { border-bottom-color: rgba(255,255,255,0.06); color: #e7edeb; }
.ppt-app .ppt-combo-option:hover,
.ppt-app .ppt-combo-option:active { background: var(--pp-vert-pale, #e4f4e9); }
html.ppt-nuit .ppt-app .ppt-combo-option:hover { background: #2a3a33; }
.ppt-app .ppt-combo-vide { padding: 11px 12px; color: var(--pp-gris, #8a9a91); font-size: 14px; }

/* Option spéciale du combobox (+ Nouveau client) : mise en évidence */
.ppt-app .ppt-combo-option-special {
	color: var(--pp-vert-vif, #1D9E3A);
	font-weight: 600;
	border-bottom: 1px solid rgba(0,0,0,0.08);
}
html.ppt-nuit .ppt-app .ppt-combo-option-special { color: #7dd894; }

/* Bouton chevron cliquable du swipe (surtout utile sur PC/souris) */
.ppt-app .ppt-swipe-chevron {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	border: none;
	background: transparent;
	color: var(--pp-gris, #b8c4bd);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.5;
	z-index: 3;
	border-radius: 6px;
}
.ppt-app .ppt-swipe-chevron:hover { opacity: 1; background: rgba(0,0,0,0.05); }
html.ppt-nuit .ppt-app .ppt-swipe-chevron:hover { background: rgba(255,255,255,0.08); }
.ppt-app .ppt-swipe.ppt-swipe-ouvert .ppt-swipe-chevron { transform: translateY(-50%) rotate(180deg); }

/* ============================================================
 * RENFORCEMENT SWIPE (corrige débordement actions + chevron)
 * ------------------------------------------------------------
 * Garantit que la carte visible couvre TOUJOURS les actions au
 * repos (fond opaque, pleine largeur) et que le chevron reste
 * bien sur la ligne, à droite, sans jamais passer à la ligne.
 * ============================================================ */
.ppt-app .ppt-swipe { overflow: hidden !important; }
.ppt-app .ppt-swipe-contenu {
	width: 100% !important;
	box-sizing: border-box !important;
	position: relative !important;
	z-index: 2 !important;
	min-height: 44px;
	padding-right: 34px !important; /* place réservée au chevron */
}
/* Fond opaque garanti dans les deux thèmes (couvre les actions). */
html:not(.ppt-nuit) .ppt-app .ppt-swipe-contenu { background: #ffffff !important; }
html.ppt-nuit .ppt-app .ppt-swipe-contenu { background: #1C1C1E !important; }

/* Le chevron : toujours sur la même ligne, centré verticalement,
   collé à droite. Jamais en bloc (pas de passage à la ligne). */
.ppt-app .ppt-swipe-chevron {
	position: absolute !important;
	right: 6px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 26px !important;
	height: 26px !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	float: none !important;
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: none !important;
}
.ppt-app .ppt-swipe.ppt-swipe-ouvert .ppt-swipe-chevron {
	transform: translateY(-50%) rotate(180deg) !important;
}

/* Les actions : chaque bouton garde une largeur fixe, texte réduit
   sous l'icône, jamais de débordement. */
.ppt-app .ppt-swipe-actions .ppt-swipe-act {
	width: 74px !important;
	padding: 0 2px !important;
	box-sizing: border-box !important;
}
.ppt-app .ppt-swipe-act-txt { font-size: 11px; line-height: 1.1; }

/* Ligne de boutons d'un formulaire (Enregistrer + Annuler côte à côte). */
.ppt-app .ppt-form-actions {
	display: flex;
	gap: 10px;
	margin-top: 10px;
}
.ppt-app .ppt-form-actions .ppt-btn { flex: 1 1 0; margin-top: 0; }

/* Potentiel automatique en étoiles (info système, à côté du A/B/C).
   Discrètes : c'est une appréciation secondaire. Vertes (couleur du
   logo) pour les étoiles obtenues. */
.ppt-app .ppt-etoiles { display: inline-flex; gap: 0; vertical-align: middle; line-height: 1; flex: 0 0 auto; white-space: nowrap; }
.ppt-app .ppt-etoile { font-size: 8px; }
.ppt-app .ppt-etoile-pleine { color: var(--ppt-vert); }
.ppt-app .ppt-etoile-vide { color: #c9d2cc; }
html.ppt-nuit .ppt-app .ppt-etoile-pleine { color: #4cc264; }
html.ppt-nuit .ppt-app .ppt-etoile-vide { color: #3a4a40; }

/* ── Mode nuit : garantir la lisibilité de TOUS les champs de
   formulaire du terrain (selects natifs, combobox, inputs), y
   compris le formulaire « Nouveau centre » de la secrétaire. ── */
html.ppt-nuit .ppt-app .ppt-form select,
html.ppt-nuit .ppt-app .ppt-form input[type="text"],
html.ppt-nuit .ppt-app .ppt-form input[type="tel"],
html.ppt-nuit .ppt-app .ppt-form input[type="search"],
html.ppt-nuit .ppt-app .ppt-form input[type="number"],
html.ppt-nuit .ppt-app .ppt-form textarea,
html.ppt-nuit .ppt-app .pp-select-type,
html.ppt-nuit .ppt-app .pp-type-libre {
	background: #23303C !important;
	color: #E7EDEB !important;
	border-color: #3A4A55 !important;
	color-scheme: dark;
}
html.ppt-nuit .ppt-app .ppt-form select option,
html.ppt-nuit .ppt-app .pp-select-type option {
	background: #23303C !important;
	color: #E7EDEB !important;
}
html.ppt-nuit .ppt-app .ppt-form ::placeholder { color: #8ea0a8 !important; }
html.ppt-nuit .ppt-app .ppt-sous-bloc {
	background: #23303C !important;
	border-color: #3A4A55 !important;
}

/* Combobox : champ signalé en erreur (valeur saisie hors liste). */
.ppt-app .ppt-combo-input.ppt-combo-erreur {
	border-color: var(--ppt-rouge) !important;
	box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.18) !important;
	background: #fff5f4;
}
html.ppt-nuit .ppt-app .ppt-combo-input.ppt-combo-erreur {
	background: #3a2523;
}

/* Coches façon WhatsApp (côté délégué, statut de lecture visite).
   Une coche = enregistrée / pas encore lue (gris).
   Double coche bleue = lue par le superviseur. */
.ppt-app .ppt-coches {
	display: inline-flex;
	align-items: center;
	margin-top: 2px;
	line-height: 1;
	font-size: 13px;
	font-weight: 700;
}
.ppt-app .ppt-coches .ppt-coche { color: #8a9a91; }
.ppt-app .ppt-coches .ppt-coche-2 { margin-left: -5px; }   /* les deux coches se chevauchent */
.ppt-app .ppt-coches-lu .ppt-coche { color: #34B7F1; }     /* bleu WhatsApp = lu */
html.ppt-nuit .ppt-app .ppt-coches .ppt-coche { color: #8E8E93; }
html.ppt-nuit .ppt-app .ppt-coches-lu .ppt-coche { color: #4FC3F7; }

/* Réponse du délégué à une mention du superviseur. */
.ppt-app .ppt-mention-reponse {
	display: block;
	margin-top: 4px;
	color: var(--ppt-vert-fonce);
	font-size: 13px;
}
.ppt-app .ppt-mention-date { color: #8a9a91; font-weight: 400; }
.ppt-app .ppt-reponse-mention { margin-top: 8px; }
.ppt-app .ppt-reponse-mention .ppt-form-inline { margin-top: 4px; }
html.ppt-nuit .ppt-app .ppt-mention-reponse { color: #7dd894; }
html.ppt-nuit .ppt-app .ppt-mention-date { color: #8E8E93; }

/* Groupes d'épingles (repliés) — onglet Épingles du Pilotage. */
.ppt-app .ppt-epingle-groupe {
	border: 1px solid var(--ppt-bord, #e0e5e2);
	border-radius: 12px;
	margin-bottom: 10px;
	background: var(--ppt-carte, #fff);
	overflow: hidden;
}
.ppt-app .ppt-epingle-groupe > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 14px;
	cursor: pointer;
	font-weight: 700;
	color: var(--ppt-vert-fonce);
	list-style: none;
}
.ppt-app .ppt-epingle-groupe > summary::-webkit-details-marker { display: none; }
.ppt-app .ppt-epingle-groupe-titre { flex: 1; }
.ppt-app .ppt-epingle-groupe-compte {
	background: #e4f4e9;
	color: var(--ppt-vert-fonce);
	border-radius: 999px;
	padding: 2px 10px;
	font-size: 13px;
	min-width: 24px;
	text-align: center;
}
.ppt-app .ppt-epingle-groupe-corps { padding: 4px 12px 12px; }
html.ppt-nuit .ppt-app .ppt-epingle-groupe { background: #1C1C1E; border-color: #38383A; }
html.ppt-nuit .ppt-app .ppt-epingle-groupe > summary { color: #7dd894; }
html.ppt-nuit .ppt-app .ppt-epingle-groupe-compte { background: #1E2C2A; color: #7dd894; }

/* ---- Boîte de dialogue (modal) d'épinglage ---- */
.ppt-app .ppt-modal, html.ppt-nuit .ppt-app .ppt-modal { position: fixed; inset: 0; z-index: 9999; }
.ppt-app .ppt-modal[hidden] { display: none; }
.ppt-app .ppt-modal-fond {
	position: absolute; inset: 0;
	background: rgba(0,0,0,0.45);
}
.ppt-app .ppt-modal-boite {
	position: absolute;
	left: 50%; bottom: 0;
	transform: translateX(-50%);
	width: 100%; max-width: 480px;
	background: #fff;
	border-radius: 16px 16px 0 0;
	padding: 8px 0 16px;
	max-height: 80vh; overflow-y: auto;
	box-shadow: 0 -6px 24px rgba(0,0,0,0.25);
}
.ppt-app .ppt-modal-tete {
	display: flex; align-items: center; justify-content: space-between;
	padding: 10px 16px; font-weight: 700; color: var(--ppt-vert-fonce);
	border-bottom: 1px solid #e0e5e2;
}
.ppt-app .ppt-modal-x {
	background: none; border: none; font-size: 18px; cursor: pointer;
	color: #61707d; padding: 4px 8px; line-height: 1;
}
.ppt-app .ppt-modal-corps { padding: 8px 12px; }
.ppt-app .ppt-modal-groupes { list-style: none; margin: 0; padding: 0; }
.ppt-app .ppt-modal-groupes li { margin: 0 0 6px; }
.ppt-app .ppt-modal-groupe {
	display: block; width: 100%; text-align: left;
	padding: 12px 14px; border: 1px solid #e0e5e2; border-radius: 10px;
	background: #f6f9f7; color: #1f2933; font-size: 15px; cursor: pointer;
}
.ppt-app .ppt-modal-groupe:active { background: #e4f4e9; }
.ppt-app .ppt-modal-nouveau { margin-top: 10px; border-top: 1px dashed #cdd8d1; padding-top: 10px; }
.ppt-app .ppt-modal-plus {
	background: none; border: none; color: var(--ppt-vert); font-weight: 700;
	font-size: 15px; cursor: pointer; padding: 6px 0;
}
.ppt-app .ppt-modal-nouveau-champ { display: flex; gap: 8px; margin-top: 8px; }
.ppt-app .ppt-modal-nouveau-champ[hidden] { display: none; }
.ppt-app .ppt-modal-nouveau-champ input {
	flex: 1; padding: 10px 12px; border: 1px solid #cdd8d1; border-radius: 9px; font-size: 15px;
}
.ppt-app .ppt-modal-valider {
	flex: 0 0 auto; width: 44px; border: none; border-radius: 9px;
	background: var(--ppt-vert); color: #fff; font-size: 18px; font-weight: 700; cursor: pointer;
}
body.ppt-modal-ouvert { overflow: hidden; }

/* Nuit */
html.ppt-nuit .ppt-app .ppt-modal-boite { background: #1C1C1E; }
html.ppt-nuit .ppt-app .ppt-modal-tete { color: #7dd894; border-bottom-color: #38383A; }
html.ppt-nuit .ppt-app .ppt-modal-groupe { background: #23303C; border-color: #3A4A55; color: #E7EDEB; }
html.ppt-nuit .ppt-app .ppt-modal-nouveau-champ input { background: #23303C; border-color: #3A4A55; color: #E7EDEB; }

/* ---- Croix « retirer épingle » (élément replié) ---- */
.ppt-app .ppt-epingle-ligne { position: relative; }
.ppt-app .ppt-epingle-ligne .ppt-epingle-carte { padding-right: 34px; }
.ppt-app .ppt-epingle-x {
	position: absolute; top: 10px; right: 8px;
	width: 24px; height: 24px; line-height: 24px; text-align: center;
	color: #b0bcc4; text-decoration: none; font-size: 15px; border-radius: 50%;
}
.ppt-app .ppt-epingle-x:active { background: rgba(0,0,0,0.06); color: var(--ppt-rouge); }
html.ppt-nuit .ppt-app .ppt-epingle-x { color: #6b7780; }

/* ---- 📌 en <details> natif, présenté en BOTTOM SHEET (slide du bas) ---- */
.ppt-app .ppt-epingle-choix { display: inline-block; }
.ppt-app .ppt-epingle-choix > summary {
	list-style: none; cursor: pointer; display: inline-flex; align-items: center;
	padding: 4px 6px; border-radius: 8px; color: var(--pp-teal-fonce);
}
.ppt-app .ppt-epingle-choix > summary svg { width: 18px; height: 18px; }
.ppt-app .ppt-epingle-choix > summary::-webkit-details-marker { display: none; }
.ppt-app .ppt-epingle-choix > summary::marker { content: ''; }

/* Le conteneur plein écran (fond sombre) n'apparaît qu'à l'ouverture. */
.ppt-app .ppt-sheet {
	position: fixed; inset: 0; z-index: 9998;
	display: block;
}
/* Fond sombre cliquable (ferme le sheet via mini-JS). */
.ppt-app .ppt-sheet-fond {
	position: absolute; inset: 0;
	background: rgba(0,0,0,0.45);
	opacity: 0; transition: opacity .25s ease;
}
.ppt-app .ppt-epingle-choix[open] .ppt-sheet-fond { opacity: 1; }
/* Le panneau qui monte du bas jusqu'aux 2/3 de l'écran. */
.ppt-app .ppt-sheet-panneau {
	position: absolute; left: 0; right: 0; bottom: 0;
	max-width: 480px; margin: 0 auto;
	max-height: 66vh; min-height: 40vh;
	background: #fff; border-radius: 18px 18px 0 0;
	box-shadow: 0 -8px 30px rgba(0,0,0,0.28);
	display: flex; flex-direction: column;
	transform: translateY(100%); transition: transform .28s ease;
	overflow: hidden;
}
.ppt-app .ppt-epingle-choix[open] .ppt-sheet-panneau { transform: translateY(0); }
.ppt-app .ppt-sheet-poignee {
	width: 40px; height: 4px; border-radius: 2px;
	background: #cdd5d0; margin: 8px auto 4px;
	flex: 0 0 auto;
}
.ppt-app .ppt-sheet-tete {
	display: flex; align-items: center; justify-content: space-between;
	padding: 8px 18px 12px; font-weight: 700; color: var(--ppt-vert-fonce);
	border-bottom: 1px solid #eef2f0; flex: 0 0 auto;
}
.ppt-app .ppt-sheet-x { cursor: pointer; color: #61707d; font-size: 18px; padding: 4px 8px; }
.ppt-app .ppt-sheet-corps { padding: 10px 12px 20px; overflow-y: auto; flex: 1 1 auto; }
.ppt-app .ppt-sheet-item {
	display: block; padding: 14px 14px; margin-bottom: 6px;
	border-radius: 10px; background: #f6f9f7;
	color: #1f2933; text-decoration: none; font-size: 15px;
}
.ppt-app .ppt-sheet-item:active { background: #e4f4e9; }
.ppt-app .ppt-sheet-nouveau { margin-top: 8px; border-top: 1px dashed #cdd8d1; padding-top: 10px; }
.ppt-app .ppt-sheet-nouveau > summary {
	list-style: none; cursor: pointer;
	color: var(--ppt-vert); font-weight: 700; font-size: 15px; padding: 8px 4px;
}
.ppt-app .ppt-sheet-nouveau > summary::-webkit-details-marker { display: none; }
.ppt-app .ppt-sheet-nouveau-form { display: flex; gap: 8px; margin-top: 8px; }
.ppt-app .ppt-sheet-nouveau-form input[type="text"] {
	flex: 1; min-width: 0; padding: 12px 12px;
	border: 1px solid #cdd8d1; border-radius: 9px; font-size: 15px;
}
.ppt-app .ppt-sheet-nouveau-form button {
	flex: 0 0 auto; width: 46px; border: none; border-radius: 9px;
	background: var(--ppt-vert); color: #fff; font-size: 18px; font-weight: 700; cursor: pointer;
}
body.ppt-sheet-ouvert { overflow: hidden; }

/* Nuit */
html.ppt-nuit .ppt-app .ppt-sheet-panneau { background: #1C1C1E; }
html.ppt-nuit .ppt-app .ppt-sheet-tete { color: #7dd894; border-bottom-color: #38383A; }
html.ppt-nuit .ppt-app .ppt-sheet-item { background: #23303C; color: #E7EDEB; }
html.ppt-nuit .ppt-app .ppt-sheet-item:active { background: #2c3d34; }
html.ppt-nuit .ppt-app .ppt-sheet-poignee { background: #48484A; }
html.ppt-nuit .ppt-app .ppt-sheet-nouveau-form input[type="text"] { background: #23303C; border-color: #3A4A55; color: #E7EDEB; }

/* ---- Rapport « Objectifs de visites » (Pilotage → Stats) ---- */
.ppt-app .ppt-obj-visites { margin-top: 22px; }
.ppt-app .ppt-obj-delegue {
	border: 1px solid #e0e5e2; border-radius: 12px;
	background: #fff; margin-bottom: 10px; overflow: hidden;
}
.ppt-app .ppt-obj-delegue > summary {
	display: flex; align-items: center; gap: 10px;
	padding: 12px 14px; cursor: pointer; list-style: none;
}
.ppt-app .ppt-obj-delegue > summary::-webkit-details-marker { display: none; }
.ppt-app .ppt-obj-nom { flex: 1 1 auto; font-weight: 700; color: var(--ppt-vert-fonce); }
.ppt-app .ppt-obj-chiffre { flex: 0 0 auto; font-size: 13px; color: #61707d; font-variant-numeric: tabular-nums; }
.ppt-app .ppt-obj-jauge {
	flex: 0 0 90px; height: 8px; border-radius: 4px;
	background: #eef2f0; overflow: hidden;
}
.ppt-app .ppt-obj-jauge-remplissage { display: block; height: 100%; background: #4b6b8a; border-radius: 4px; }
.ppt-app .ppt-obj-jauge-remplissage.ppt-obj-atteint { background: var(--ppt-vert); }
.ppt-app .ppt-obj-detail { padding: 0 14px 14px; }
.ppt-app .ppt-obj-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ppt-app .ppt-obj-table th { text-align: left; color: #8a9a91; font-weight: 600; font-size: 12px; padding: 6px 4px; border-bottom: 1px solid #eef2f0; }
.ppt-app .ppt-obj-table td { padding: 8px 4px; border-bottom: 1px solid #f4f7f5; font-variant-numeric: tabular-nums; }
.ppt-app .ppt-obj-table td.ppt-obj-ok { color: var(--ppt-vert); font-weight: 700; }
.ppt-app .ppt-obj-quota { margin-top: 10px; font-size: 13px; color: #61707d; }
html.ppt-nuit .ppt-app .ppt-obj-delegue { background: #1C1C1E; border-color: #38383A; }
html.ppt-nuit .ppt-app .ppt-obj-nom { color: #7dd894; }
html.ppt-nuit .ppt-app .ppt-obj-jauge { background: #2c2c2e; }
html.ppt-nuit .ppt-app .ppt-obj-table th { border-bottom-color: #2c2c2e; }
html.ppt-nuit .ppt-app .ppt-obj-table td { border-bottom-color: #262628; }

/* ============================================================
 * SEMAINIER DE SUPERVISION
 * ============================================================ */

/* En-tête : titre + semaine + badge d'état */
.ppt-app .ppt-semainier-tete {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 2px;
}
.ppt-app .ppt-semainier-tete h2 { margin: 0; }
.ppt-app .ppt-semainier-semaine {
	font-size: 13px;
	color: var(--pp-gris);
	margin: 2px 0 0;
}
.ppt-app .ppt-semainier-badge {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 11px;
	border-radius: 999px;
	white-space: nowrap;
}
.ppt-app .ppt-semainier-badge svg { width: 13px; height: 13px; }
.ppt-app .ppt-semainier-badge-soumis { background: var(--ppt-vert-pale); color: var(--ppt-vert-fonce); }
.ppt-app .ppt-semainier-badge-brouillon { background: rgba(199, 125, 10, 0.14); color: var(--ppt-ambre); }

/* Navigation de semaine : flèches rondes + pilule centrale */
.ppt-app .ppt-semainier-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 14px 0 4px;
}
.ppt-app .ppt-semainier-nav-actuelle { flex: 0 1 auto; }

/* Récap chiffré de la semaine (3 blocs) */
.ppt-app .ppt-semainier-recap {
	display: flex;
	gap: 8px;
	margin: 14px 0 4px;
}
.ppt-app .ppt-semainier-recap-bloc {
	flex: 1 1 0;
	text-align: center;
	background: var(--pp-fond);
	border: 1px solid var(--pp-separateur);
	border-radius: 12px;
	padding: 10px 6px;
}
.ppt-app .ppt-semainier-recap-bloc strong {
	display: block;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.1;
	color: var(--ppt-vert-fonce);
}
.ppt-app .ppt-semainier-recap-bloc span { font-size: 11px; color: var(--pp-gris); }
.ppt-app .ppt-semainier-recap-reste strong { color: var(--ppt-ambre); }

/* Bloc d'un jour */
.ppt-app .ppt-semainier-jour {
	margin-top: 18px;
	padding-top: 12px;
	border-top: 2px solid var(--pp-separateur);
}
.ppt-app .ppt-semainier-jour-tete {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}
.ppt-app .ppt-semainier-jour-titre {
	font-size: 15px;
	font-weight: 700;
	color: var(--ppt-vert-fonce);
	margin: 0;
}
.ppt-app .ppt-semainier-jour-nb {
	flex: 0 0 auto;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--ppt-vert-pale);
	color: var(--ppt-vert-fonce);
	font-size: 11px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.ppt-app .ppt-semainier-jour-we .ppt-semainier-jour-titre { color: var(--ppt-ambre); }
.ppt-app .ppt-semainier-jour-we .ppt-semainier-jour-nb { background: rgba(199,125,10,.14); color: var(--ppt-ambre); }
.ppt-app .ppt-semainier-vide {
	font-size: 13px;
	color: var(--pp-gris);
	margin: 0 0 8px;
	font-style: italic;
}

/* Carte d'une activité */
.ppt-app .ppt-semainier-carte {
	background: var(--pp-carte);
	border: 1px solid var(--pp-separateur);
	border-left: 3px solid var(--ppt-ambre);
	border-radius: 12px;
	padding: 12px;
	margin-bottom: 10px;
}
.ppt-app .ppt-semainier-carte.est-fait { border-left-color: var(--ppt-vert); }

.ppt-app .ppt-semainier-carte-tete {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	flex-wrap: wrap;
}
.ppt-app .ppt-semainier-statut {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 999px;
}
.ppt-app .ppt-semainier-statut svg { width: 13px; height: 13px; }
.ppt-app .ppt-semainier-statut-afaire { background: rgba(199,125,10,.14); color: var(--ppt-ambre); }
.ppt-app .ppt-semainier-statut-fait { background: var(--ppt-vert-pale); color: var(--ppt-vert-fonce); }
.ppt-app .ppt-semainier-zone {
	font-size: 11px;
	font-weight: 600;
	color: var(--pp-encre);
	background: var(--pp-fond);
	border: 1px solid var(--pp-separateur);
	padding: 2px 9px;
	border-radius: 999px;
}

.ppt-app .ppt-semainier-objet {
	font-size: 15px;
	font-weight: 700;
	color: var(--pp-encre);
	margin: 0 0 6px;
	line-height: 1.35;
}
.ppt-app .ppt-semainier-champ {
	font-size: 13px;
	color: var(--pp-encre);
	margin: 4px 0 0;
	line-height: 1.4;
}
.ppt-app .ppt-semainier-etiq {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--pp-gris);
	margin-right: 4px;
}
.ppt-app .ppt-semainier-champ-fait .ppt-semainier-etiq { color: var(--ppt-vert-fonce); }

/* Actions d'une carte */
.ppt-app .ppt-semainier-carte-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
	flex-wrap: wrap;
}
.ppt-app .ppt-semainier-volet { flex: 0 0 auto; }
.ppt-app .ppt-semainier-volet > summary {
	list-style: none;
	cursor: pointer;
}
.ppt-app .ppt-semainier-volet > summary::-webkit-details-marker { display: none; }
/* le summary EST un bouton (classes ppt-btn) → il hérite du style */
.ppt-app .ppt-semainier-volet > summary.ppt-btn svg { width: 15px; height: 15px; }
/* Le bouton « Noter réalisé » : compact (plus petit qu'un mini). */
.ppt-app .ppt-semainier-btn-realise { min-height: 30px !important; padding: 4px 12px !important; font-size: 12px !important; }
.ppt-app .ppt-semainier-btn-realise svg { width: 13px !important; height: 13px !important; }

.ppt-app .ppt-semainier-lien-modif {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	font-weight: 600;
	color: var(--pp-gris);
	padding: 4px 2px;
}
.ppt-app .ppt-semainier-lien-modif svg { width: 14px; height: 14px; }

/* Formulaires (réalisé, modif, ajout) */
.ppt-app .ppt-semainier-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 10px;
	padding: 12px;
	background: var(--pp-fond);
	border-radius: 10px;
}
.ppt-app .ppt-semainier-volet-modif .ppt-semainier-form { margin-top: 8px; }
.ppt-app .ppt-semainier-form label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: var(--pp-gris);
}
.ppt-app .ppt-semainier-suppr { margin-top: 8px; }

/* Ajouter une activité / un jour */
.ppt-app .ppt-semainier-ajout { margin-top: 8px; }
.ppt-app .ppt-semainier-ajout-btn {
	list-style: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ppt-vert-fonce);
	padding: 8px 12px;
	border: 1px dashed var(--pp-separateur);
	border-radius: 999px;
}
.ppt-app .ppt-semainier-ajout-btn::-webkit-details-marker { display: none; }
.ppt-app .ppt-semainier-ajout-btn svg { width: 16px; height: 16px; }
.ppt-app .ppt-semainier-weekend {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px dashed var(--pp-separateur);
}
.ppt-app .ppt-semainier-we-titre { font-size: 14px; color: var(--ppt-ambre); margin: 10px 0 2px; }

/* Pied : soumettre + imprimer */
.ppt-app .ppt-semainier-pied {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 22px;
	padding-top: 16px;
	border-top: 2px solid var(--pp-separateur);
}
.ppt-app .ppt-semainier-pied-soumettre { margin: 0; flex: 1 1 auto; }
.ppt-app .ppt-semainier-pied-soumettre .ppt-btn { width: 100%; }

/* ── Semainier : contacts, fichiers, lignes répétables ── */
.ppt-semainier-sous-titre {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: var(--pp-gris);
	margin-bottom: 4px;
}
.ppt-app .ppt-semainier-contacts,
.ppt-app .ppt-semainier-fichiers-champs {
	background: var(--pp-carte);
	border: 1px solid var(--pp-separateur);
	border-radius: 10px;
	padding: 10px;
}
.ppt-app .ppt-semainier-contact-ligne,
.ppt-app .ppt-semainier-lien-ligne {
	display: flex;
	gap: 6px;
	margin-bottom: 6px;
}
.ppt-app .ppt-semainier-contact-ligne input,
.ppt-app .ppt-semainier-lien-ligne input { flex: 1 1 0; min-width: 0; }
.ppt-app .ppt-semainier-ajout-ligne {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: none;
	border: none;
	color: var(--ppt-vert-fonce);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	padding: 4px 2px;
}
.ppt-app .ppt-semainier-ajout-ligne svg { width: 14px; height: 14px; }
.ppt-app .ppt-semainier-upload {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ppt-vert-fonce);
	padding: 8px 0;
	cursor: pointer;
}
.ppt-app .ppt-semainier-upload svg { width: 15px; height: 15px; }
.ppt-app .ppt-semainier-upload input[type="file"] { font-size: 12px; font-weight: 400; }
.ppt-app .ppt-semainier-liens { margin-top: 8px; }

/* Affichage : puces de contact + fichiers */
.ppt-app .ppt-semainier-meta,
.ppt-app .ppt-semainier-fichiers {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}
.ppt-app .ppt-semainier-contact-puce {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: var(--pp-fond);
	border: 1px solid var(--pp-separateur);
	border-radius: 999px;
	padding: 2px 4px 2px 10px;
	font-size: 12px;
}
.ppt-app .ppt-semainier-tel {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--ppt-vert);
	color: #fff !important;
	box-shadow: none;
	min-height: 0;
	padding: 0;
}
.ppt-app .ppt-semainier-tel svg { width: 14px; height: 14px; }
.ppt-app .ppt-semainier-fichier {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: var(--ppt-vert-pale);
	color: var(--ppt-vert-fonce);
	border-radius: 999px;
	padding: 3px 10px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
}
.ppt-app .ppt-semainier-fichier svg { width: 13px; height: 13px; }

/* Liste des fichiers dans le formulaire de modif */
.ppt-app .ppt-semainier-fichiers-liste { margin-top: 10px; }
.ppt-app .ppt-semainier-fichier-ligne {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 6px 0;
	border-top: 1px solid var(--pp-separateur);
}
.ppt-app .ppt-semainier-fichier-ligne a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	color: var(--ppt-vert-fonce);
	text-decoration: none;
}
.ppt-app .ppt-semainier-fichier-ligne form { margin: 0; }
.ppt-app .ppt-semainier-fichier-x {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--ppt-rouge-pale, #fbeae8);
	color: var(--ppt-rouge);
	border: none;
	cursor: pointer;
}
.ppt-app .ppt-semainier-fichier-x svg { width: 15px; height: 15px; }

/* ── Semainier v2 : actions SVG, heure, anti-débordement ── */
/* Barre d'actions : 3 boutons-icônes ronds (réaliser/modifier/suppr) */
.ppt-app .ppt-semainier-carte-actions {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 12px;
	flex-wrap: wrap;
}
.ppt-app .ppt-semainier-carte-actions form { margin: 0; }
.ppt-app .ppt-semainier-volet { flex: 0 0 auto; }
.ppt-app .ppt-semainier-volet > summary { list-style: none; cursor: pointer; }
.ppt-app .ppt-semainier-volet > summary::-webkit-details-marker { display: none; }
/* Le bouton-icône d'action rond (hérite de .ppt-btn-icone) */
.ppt-app .ppt-semainier-act {
	width: 38px; height: 38px; min-height: 38px; min-width: 38px;
	border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--ppt-vert-pale); color: var(--ppt-vert-fonce);
	border: none; cursor: pointer; padding: 0;
}
.ppt-app .ppt-semainier-act svg { width: 18px; height: 18px; }
.ppt-app .ppt-semainier-act.est-fait { background: var(--ppt-vert); color: #fff; }
.ppt-app .ppt-semainier-act-suppr { background: var(--ppt-rouge-pale, #fbeae8); color: var(--ppt-rouge); }
html.ppt-nuit .ppt-app .ppt-semainier-act { background: #243a2e; color: #7dd894; }
html.ppt-nuit .ppt-app .ppt-semainier-act-suppr { background: rgba(224,87,74,.2); color: #e0574a; }
/* Quand un volet est ouvert, son formulaire prend toute la largeur
   sous la barre de boutons. */
.ppt-app .ppt-semainier-volet[open] { flex: 1 1 100%; order: 3; }
.ppt-app .ppt-semainier-volet[open] > summary { background: var(--ppt-vert); color: #fff; }
.ppt-app .ppt-semainier-volet-modif[open] > summary { background: var(--pp-gris); color: #fff; }

/* Heure sur la carte : pastille discrète devant l'objet */
.ppt-app .ppt-semainier-heure {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	color: var(--ppt-vert-fonce);
	background: var(--ppt-vert-pale);
	border-radius: 6px;
	padding: 1px 7px;
	margin-right: 7px;
	vertical-align: middle;
}

/* ANTI-DÉBORDEMENT : tous les champs du semainier restent dans le
   cadre (cause des champs qui traversaient l'écran). */
.ppt-app .ppt-semainier-form,
.ppt-app .ppt-semainier-contacts,
.ppt-app .ppt-semainier-fichiers-champs { box-sizing: border-box; max-width: 100%; }
/* Chaque label = intitulé au-dessus + champ en dessous, espacés. */
.ppt-app .ppt-semainier-form > label,
.ppt-app .ppt-semainier-form-duo > label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	font-weight: 700;
	color: var(--pp-gris);
}
.ppt-app .ppt-semainier-form > label input,
.ppt-app .ppt-semainier-form > label select,
.ppt-app .ppt-semainier-form > label textarea,
.ppt-app .ppt-semainier-form-duo > label input,
.ppt-app .ppt-semainier-form-duo > label select {
	font-weight: 400;
}
.ppt-app .ppt-semainier-form input,
.ppt-app .ppt-semainier-form select,
.ppt-app .ppt-semainier-form textarea,
.ppt-app .ppt-semainier-contacts input,
.ppt-app .ppt-semainier-fichiers-champs input {
	width: 100%;
	box-sizing: border-box;
	max-width: 100%;
}
/* Duo Jour / Heure côte à côte */
.ppt-app .ppt-semainier-form-duo { display: flex; gap: 12px; flex-wrap: nowrap; align-items: flex-end; }
.ppt-app .ppt-semainier-form-duo > label { min-width: 0; flex: 1 1 auto; margin: 0; }
/* L'heure : étroite (elle n'a besoin que de « 00:00 ») ; l'autre
   champ (Zone ou Jour) prend tout le reste de la ligne. */
.ppt-app .ppt-semainier-champ-heure { flex: 0 0 100px !important; }
/* Tous les champs du duo à la MÊME hauteur ET au même style que les
   autres champs (le widget time natif n'a ni bord ni arrondi par
   défaut → on les force pour la cohérence). */
.ppt-app .ppt-semainier-form-duo input {
	width: 100%;
	box-sizing: border-box;
	height: 44px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid var(--pp-separateur);
	border-radius: var(--pp-rayon-sm, 10px);
	background: var(--pp-carte);
	color: var(--pp-encre);
	-webkit-appearance: none;
	appearance: none;
	font-size: 15px;
}

/* Contacts : nom + téléphone bien séparés, empilés proprement */
.ppt-app .ppt-semainier-contact-ligne {
	display: flex;
	gap: 8px;
	margin-bottom: 8px;
}
.ppt-app .ppt-semainier-contact-ligne input { flex: 1 1 0; min-width: 0; }
.ppt-app .ppt-semainier-contact-boutons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}
.ppt-app .ppt-semainier-contact-boutons .ppt-btn svg { width: 15px; height: 15px; }
.ppt-app .ppt-semainier-repertoire-btn[hidden] { display: none; }

/* Bouton « Choisir des fichiers » : vrai bouton pilule (le natif
   était archaïque) + info du nombre de fichiers */
.ppt-app .ppt-semainier-upload-btn { cursor: pointer; }
.ppt-app .ppt-semainier-upload-btn svg { width: 15px; height: 15px; }
.ppt-app .ppt-semainier-upload-info {
	display: inline-block;
	margin-left: 8px;
	font-size: 12px;
	color: var(--pp-gris);
}

/* Liste des documents joints : nom qui ne déborde plus */
.ppt-app .ppt-semainier-fichier-ligne a {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1 1 auto;
}
.ppt-app .ppt-semainier-fichier {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ── Semainier : liste côté Direction ── */
.ppt-app .ppt-semainier-liste { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ppt-app .ppt-semainier-liste-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background: var(--pp-carte);
	border: 1px solid var(--pp-separateur);
	border-radius: 12px;
	text-decoration: none;
	color: var(--pp-encre);
}
.ppt-app .ppt-semainier-liste-icone {
	flex: 0 0 auto;
	width: 42px; height: 42px;
	border-radius: 50%;
	background: var(--ppt-vert-pale);
	color: var(--ppt-vert-fonce);
	display: inline-flex; align-items: center; justify-content: center;
}
.ppt-app .ppt-semainier-liste-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ppt-app .ppt-semainier-liste-txt strong { font-size: 15px; }
.ppt-app .ppt-semainier-liste-txt small { font-size: 12px; color: var(--pp-gris); }
.ppt-app .ppt-semainier-liste-meta { font-size: 11px !important; }
.ppt-app .ppt-semainier-liste-chevron { flex: 0 0 auto; color: var(--pp-gris); font-size: 20px; }

/* ── Semainier : mini-actions rondes (SVG) pour contacts/fichiers ── */
.ppt-app .ppt-semainier-mini-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	flex-wrap: wrap;
}
.ppt-app .ppt-semainier-mini-act {
	width: 38px; height: 38px; min-width: 38px; min-height: 38px;
	border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--ppt-vert-pale); color: var(--ppt-vert-fonce);
	border: none; cursor: pointer; padding: 0;
	flex: 0 0 auto;
}
.ppt-app .ppt-semainier-mini-act svg { width: 18px; height: 18px; }
html.ppt-nuit .ppt-app .ppt-semainier-mini-act { background: #243a2e; color: #7dd894; }
.ppt-app .ppt-semainier-mini-aide { font-size: 12px; color: var(--pp-gris); }
.ppt-app .ppt-semainier-repertoire-btn[hidden] { display: none; }
/* Ligne de lien ajoutée dynamiquement */
.ppt-app .ppt-semainier-lien-ligne { margin-top: 8px; }
.ppt-app .ppt-semainier-lien-ligne input { width: 100%; box-sizing: border-box; }

/* ── Semainier : carte pro côté Direction ── */
.ppt-app .ppt-semainier-carte-dir {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px;
	background: var(--pp-carte);
	border: 1px solid var(--pp-separateur);
	border-radius: 14px;
	text-decoration: none;
	color: var(--pp-encre);
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
	transition: box-shadow .12s ease, transform .12s ease;
}
.ppt-app .ppt-semainier-carte-dir:active { transform: scale(0.99); }
.ppt-app .ppt-semainier-carte-dir { align-items: flex-start !important; }
.ppt-app .ppt-semainier-carte-avatar {
	flex: 0 0 auto;
	width: 44px; height: 44px;
	border-radius: 50%;
	overflow: hidden;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--ppt-vert-pale); color: var(--ppt-vert-fonce);
}
.ppt-app .ppt-semainier-carte-avatar img,
.ppt-app .ppt-semainier-carte-avatar-img {
	width: 44px; height: 44px; object-fit: cover; display: block; border-radius: 50%;
}
.ppt-app .ppt-semainier-carte-corps { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ppt-app .ppt-semainier-carte-nom { font-size: 15px; font-weight: 700; color: var(--pp-encre); }
.ppt-app .ppt-semainier-carte-semaine {
	display: inline-flex; align-items: center; gap: 5px;
	font-size: 12px; color: var(--pp-gris);
}
.ppt-app .ppt-semainier-carte-semaine svg { width: 12px; height: 12px; flex: 0 0 auto; }
.ppt-app .ppt-semainier-carte-puces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ppt-app .ppt-semainier-puce {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 11px; font-weight: 600;
	background: var(--pp-fond); border: 1px solid var(--pp-separateur);
	color: var(--pp-encre);
	border-radius: 999px; padding: 3px 9px;
}
.ppt-app .ppt-semainier-puce svg { width: 12px; height: 12px; }
.ppt-app .ppt-semainier-puce-ok { background: var(--ppt-vert-pale); border-color: transparent; color: var(--ppt-vert-fonce); }
.ppt-app .ppt-semainier-carte-date { font-size: 11px; color: var(--pp-gris); }
.ppt-app .ppt-semainier-carte-fleche { flex: 0 0 auto; color: var(--pp-gris); font-size: 22px; align-self: center; }

/* Résumé de l'historique : texte + bouton imprimer alignés */
.ppt-app .ppt-semainier-histo-resume {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 12px 0 8px;
	font-size: 13px;
}
.ppt-app .ppt-semainier-histo-resume strong { color: var(--ppt-vert-fonce); }

/* Bouton modifier sur une ligne de prix */
.ppt-app .ppt-prix-modifier { flex: 0 0 auto; width: 34px; height: 34px; }
.ppt-app .ppt-prix-modifier svg { width: 17px; height: 17px; }
