/* =========================================================
   ESPACE CLIENT — bdasecurite.com/espace-client
   Univers BDA : nuit bleutée, or, typographie Montserrat + Playfair
   ========================================================= */
body.ec { min-height: 100svh; background: radial-gradient(90% 60% at 80% -10%, rgba(182, 144, 84, 0.1), transparent 60%), radial-gradient(70% 60% at 0% 100%, rgba(190, 156, 102, 0.08), transparent 60%), var(--bg); }
.ec-ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ec-chargement { display: flex; justify-content: center; gap: 8px; padding: 40vh 0; }
.ec-chargement span { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); animation: ec-pulse 1s ease-in-out infinite; }
.ec-chargement span:nth-child(2) { animation-delay: 0.15s; }
.ec-chargement span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ec-pulse { 50% { opacity: 0.25; transform: scale(0.8); } }
.ec-message { padding: 40px 20px; text-align: center; color: var(--muted); }
.ec-petit { margin: 0; color: var(--muted); font-size: 13px; }
.ec-petit a, .ec-centre a { color: var(--gold-light); }
.ec-centre { text-align: center; }

/* ---------- Connexion / activation : écran partagé ---------- */
.ec-auth { min-height: 100svh; display: grid; grid-template-columns: 1.1fr 1fr; }
.ec-auth__visuel { position: relative; display: flex; align-items: center; padding: clamp(30px, 5vw, 70px); background: linear-gradient(160deg, rgba(51, 47, 40, 0.55), rgba(19, 17, 15, 0.2)); }
.ec-auth__visuel::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 1px; background: linear-gradient(transparent, rgba(182, 144, 84, 0.6), transparent); }
.ec-auth__slogan span { color: var(--gold); font-size: 11px; font-weight: 600; letter-spacing: 0.28em; text-transform: uppercase; }
.ec-auth__slogan p { margin: 12px 0 0; max-width: 480px; font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.25; color: var(--text); }
.ec-auth__slogan em { font-family: var(--font-serif); font-weight: 500; color: var(--gold-light); }
.ec-auth__carte { display: grid; align-content: center; gap: 16px; width: min(440px, 100%); margin: 0 auto; padding: 40px 24px; }
.ec-auth__marque { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--text); }
.ec-auth__marque b { display: block; font-family: var(--font-display); font-size: 17px; letter-spacing: 0.04em; }
.ec-auth__marque small { display: block; color: var(--gold); font-size: 10px; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; }
.ec-auth h1 { font-family: var(--font-display); font-size: 30px; color: var(--text); }
.ec-auth__texte { margin: -6px 0 4px; color: var(--muted); font-size: 15px; }
.ec-auth__id { margin: 0; color: var(--muted); font-size: 14px; }
.ec-auth__id b { color: var(--gold-light); }
.ec-auth__petit, .ec-auth__aide { margin: 0; font-size: 12.5px; color: var(--muted-2); line-height: 1.55; }
.ec-auth__aide a { color: var(--gold-light); }
.ec-form { display: grid; gap: 14px; }
.ec-champ { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.ec-input { width: 100%; padding: 14px 15px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(13, 12, 10, 0.75); color: var(--text); font: inherit; font-size: 15px; transition: border-color 0.2s, box-shadow 0.2s; }
.ec-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(182, 144, 84, 0.18); }
.ec-erreur { margin: 0; color: #e2d3ba; font-size: 13px; }
.ec-erreur:empty { display: none; }
.ec-form .btn { justify-content: center; }

/* ---------- Application : menu latéral + contenu ---------- */
.ec-app { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 100svh; }
.ec-cote { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; gap: 18px; padding: 22px 16px; background: linear-gradient(180deg, rgba(35, 32, 28, 0.95), rgba(19, 17, 15, 0.95)); box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06), 1px 0 0 rgba(182, 144, 84, 0.1); }
.ec-cote__marque { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: var(--text); }
.ec-cote__marque b { display: block; font-family: var(--font-display); font-size: 15px; }
.ec-cote__marque small { display: block; color: var(--gold); font-size: 9.5px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; }
.ec-cote__client { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid rgba(182, 144, 84, 0.25); background: linear-gradient(135deg, rgba(182, 144, 84, 0.12), transparent); }
.ec-cote__client > span:last-child { min-width: 0; }
.ec-cote__client b { display: block; color: var(--text); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-cote__client small { display: block; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--gold-grad); color: #0b0b0c; font-weight: 700; font-size: 14px; }
.ec-nav { display: grid; gap: 3px; }
.ec-nav__item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 11px; background: none; color: var(--muted); font: inherit; font-size: 14.5px; font-weight: 500; text-align: left; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.ec-nav__item:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.ec-nav__item.is-actif { background: linear-gradient(90deg, rgba(182, 144, 84, 0.18), rgba(182, 144, 84, 0.04)); color: var(--gold-light); box-shadow: inset 0 0 0 1px rgba(182, 144, 84, 0.2); }
.ec-nav__badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 99px; background: #ff9d5c; color: #1a0f05; font-style: normal; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
.ec-cote__bas { margin-top: auto; display: grid; gap: 8px; }
.ec-cote__contact { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.08); color: var(--gold-light); }
.ec-cote__contact small { display: block; color: var(--muted); font-size: 11px; }
.ec-cote__contact b { display: block; color: var(--text); font-size: 14px; }
.ec-principal { min-width: 0; padding: clamp(20px, 4vw, 44px) clamp(16px, 4vw, 48px) 60px; }
.ec-vue { width: min(980px, 100%); display: grid; gap: 18px; animation: ec-entree 0.4s ease both; }
@keyframes ec-entree { from { opacity: 0; transform: translateY(8px); } }
.ec-barre { display: none; }

/* Titres de page */
.ec-entete p { margin: 0 0 6px; color: var(--gold); font-size: 11px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; }
.ec-entete h1 { font-family: var(--font-display); font-size: clamp(24px, 4vw, 34px); color: var(--text); }
.ec-entete span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }

/* Accueil */
.ec-hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: clamp(22px, 4vw, 34px); border-radius: 22px; border: 1px solid rgba(182, 144, 84, 0.3); background: radial-gradient(80% 140% at 100% 0%, rgba(182, 144, 84, 0.18), transparent 55%), linear-gradient(160deg, #2d2a24, #201d19); }
.ec-hero::before { content: ""; position: absolute; left: 30px; right: 30px; top: -1px; height: 2px; background: var(--gold-grad); border-radius: 2px; }
.ec-hero p { margin: 0 0 4px; color: var(--gold); font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
.ec-hero h1 { font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: clamp(28px, 5vw, 44px); line-height: 1.1; color: var(--text); }
.ec-hero > div > span { display: block; margin-top: 10px; color: var(--muted); font-size: 14.5px; }
.ec-hero__badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 99px; border: 1px solid rgba(62, 207, 142, 0.35); background: rgba(62, 207, 142, 0.08); color: #9fe3c1; font-size: 12px; font-weight: 600; }
.ec-hero__badge .ec-ic { width: 16px; height: 16px; }
.ec-tuiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ec-tuile { display: grid; gap: 3px; padding: 18px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.08); background: linear-gradient(165deg, #302c25, #201d19); transition: transform 0.3s, border-color 0.3s; }
.ec-tuile:hover { transform: translateY(-3px); border-color: rgba(182, 144, 84, 0.45); }
.ec-tuile.is-alerte { border-color: rgba(255, 157, 92, 0.45); background: linear-gradient(165deg, rgba(255, 157, 92, 0.1), #201d19 70%); }
.ec-tuile__ic { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 8px; border-radius: 12px; background: rgba(182, 144, 84, 0.12); color: var(--gold-light); }
.ec-tuile.is-alerte .ec-tuile__ic { background: rgba(255, 157, 92, 0.15); color: #ffb98a; }
.ec-tuile small { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.ec-tuile b { color: var(--text); font-family: var(--font-display); font-size: 22px; }
.ec-tuile span:last-child { color: var(--muted-2); font-size: 12.5px; }

/* Cartes et listes */
.ec-carte { display: grid; gap: 14px; padding: 20px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(35, 32, 28, 0.72); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.ec-carte h2 { font-family: var(--font-display); font-size: 17px; color: var(--text); }
.ec-carte__tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ec-vide { display: grid; justify-items: center; gap: 10px; padding: 26px 10px; text-align: center; color: var(--muted); font-size: 14px; }
.ec-vide .ec-ic { width: 30px; height: 30px; color: var(--gold); opacity: 0.7; }
.ec-vide p { margin: 0; max-width: 420px; }
.ec-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ec-liste a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.07); background: rgba(13, 12, 10, 0.45); color: var(--text); transition: border-color 0.2s, transform 0.25s; }
.ec-liste a:hover { border-color: rgba(182, 144, 84, 0.45); transform: translateX(3px); }
.ec-liste a.is-nouveau { border-color: rgba(182, 144, 84, 0.4); box-shadow: inset 3px 0 0 var(--gold); }
.ec-liste a > .ec-ic { color: var(--muted); width: 18px; height: 18px; }
.ec-doc-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: rgba(190, 156, 102, 0.14); color: #e5d8c3; }
.ec-doc-ic--factures { background: rgba(182, 144, 84, 0.14); color: var(--gold-light); }
.ec-liste__txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ec-liste__txt b { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; }
.ec-liste__txt small { color: var(--muted); font-size: 12.5px; }
.ec-nouveau { padding: 2px 7px; border-radius: 99px; background: var(--gold-grad); color: #0b0b0c; font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.ec-liste__montant { font-weight: 600; font-variant-numeric: tabular-nums; }
.ec-pastille { flex: none; padding: 4px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 600; }
.ec-pastille--attente { background: rgba(255, 157, 92, 0.14); color: #ffb98a; }
.ec-pastille--ok { background: rgba(62, 207, 142, 0.14); color: #7fe0b2; }
.ec-pastille--non { background: rgba(255, 255, 255, 0.07); color: var(--muted); }
.ec-contact { grid-template-columns: 1fr auto; align-items: center; background: linear-gradient(120deg, rgba(182, 144, 84, 0.1), rgba(35, 32, 28, 0.72) 60%); }
.ec-contact p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.ec-boutons { display: flex; flex-wrap: wrap; gap: 10px; }
.ec-boutons .btn, .ec-doc__actions .btn { padding: 12px 18px; }
.ec-infos { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; font-size: 14px; }
.ec-infos dt { color: var(--muted); }
.ec-infos dd { margin: 0; color: var(--text); white-space: pre-line; }

/* Messagerie */
.ec-messagerie { gap: 0; padding: 0; overflow: hidden; }
.ec-fil { display: flex; flex-direction: column; gap: 10px; min-height: 280px; max-height: 58vh; overflow-y: auto; padding: 20px; }
.ec-bulle { max-width: 80%; padding: 11px 15px; border-radius: 18px; }
.ec-bulle p { margin: 0 0 5px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.5; }
.ec-bulle small { color: var(--muted); font-size: 11px; }
.ec-bulle--client { align-self: flex-end; background: linear-gradient(135deg, rgba(182, 144, 84, 0.32), rgba(182, 144, 84, 0.14)); border: 1px solid rgba(182, 144, 84, 0.35); border-bottom-right-radius: 5px; }
.ec-bulle--admin { align-self: flex-start; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.08); border-bottom-left-radius: 5px; }
.ec-fil__envoi { display: flex; gap: 10px; align-items: flex-end; padding: 14px; border-top: 1px solid rgba(255, 255, 255, 0.08); background: rgba(13, 12, 10, 0.4); }
.ec-fil__saisie { flex: 1; resize: vertical; min-height: 54px; }

/* Document en lecture (feuille claire, imprimable) */
.ec-doc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ec-retour { margin-right: auto; color: var(--muted); font-size: 14px; }
.ec-retour:hover { color: var(--gold-light); }
.ec-doc__actions .ec-ic { width: 17px; height: 17px; }
.ec-feuille { background: #fff; color: #1b1b1f; border-radius: 16px; padding: clamp(20px, 5vw, 46px); display: grid; gap: 20px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8); font-size: 13.5px; line-height: 1.5; }
.ec-feuille__tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 2px solid #b69054; }
.ec-feuille__logo { width: 110px; height: auto; }
.ec-feuille__titre { display: grid; gap: 4px; justify-items: end; text-align: right; }
.ec-feuille__titre h2 { font-family: var(--font-display); font-size: 26px; letter-spacing: 0.12em; text-transform: uppercase; color: #111; }
.ec-feuille__parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ec-feuille small { display: block; color: #7d6236; font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 4px; }
.ec-feuille p { margin: 0; color: #3a3a40; }
.ec-feuille__meta { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 12px 14px; border-radius: 10px; background: #faf8f4; }
.ec-feuille__objet b { font-size: 15px; }
.ec-feuille__table { overflow-x: auto; }
.ec-feuille table { width: 100%; border-collapse: collapse; min-width: 480px; }
.ec-feuille th { background: #26221d; color: #fff; text-align: left; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; padding: 9px 10px; }
.ec-feuille th:not(:first-child), .ec-feuille td:not(:first-child) { text-align: right; white-space: nowrap; }
.ec-feuille td { padding: 10px; border-bottom: 1px solid #f2ece3; vertical-align: top; }
.ec-feuille td small { display: block; margin-top: 3px; color: #6b7590; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; }
.ec-feuille__totaux { justify-self: end; width: min(360px, 100%); display: grid; }
.ec-feuille__totaux div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 12px; border-bottom: 1px solid #f2ece3; }
.ec-feuille__totaux .is-grand { margin-top: 6px; border: 0; border-radius: 8px; background: linear-gradient(135deg, #614b29, #26221d); color: #fff; font-weight: 700; }
.ec-feuille__bloc { padding: 12px 14px; border-radius: 10px; border: 1px solid #f2ece3; }
.ec-feuille .ec-petit { color: #5a5a60; font-size: 12px; }
.ec-feuille__pied { color: #6b7590; font-size: 11px; text-align: center; border-top: 1px solid #f2ece3; padding-top: 12px; }
.ec-feuille .ec-pastille--attente { background: #fff1e6; color: #b45a14; }
.ec-feuille .ec-pastille--ok { background: #e6f7ee; color: #1f7a4d; }

.ec-toast { position: fixed; left: 50%; bottom: 90px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px; background: #302c25; border: 1px solid rgba(182, 144, 84, 0.45); color: var(--text); font-size: 14px; box-shadow: 0 20px 50px -20px #000; transition: opacity 0.3s, transform 0.3s; }
.ec-toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.ec-toast.is-erreur { border-color: rgba(215, 194, 161, 0.6); }

/* ---------- Téléphone : barre de navigation en bas, comme une appli ---------- */
@media (max-width: 860px) {
  .ec-auth { grid-template-columns: 1fr; }
  .ec-auth__visuel { padding: 34px 24px 0; background: none; }
  .ec-auth__visuel::after { display: none; }
  .ec-auth__slogan p { font-size: 20px; }
  .ec-app { grid-template-columns: 1fr; }
  .ec-cote { display: none; }
  .ec-principal { padding: 18px 14px calc(96px + env(safe-area-inset-bottom)); }
  .ec-barre { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(19, 17, 15, 0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 -1px 0 rgba(182, 144, 84, 0.25); }
  .ec-barre a { position: relative; display: grid; justify-items: center; gap: 3px; padding: 7px 2px; border-radius: 12px; color: var(--muted); font-size: 10.5px; font-weight: 600; }
  .ec-barre a.is-actif { color: var(--gold-light); background: rgba(182, 144, 84, 0.1); }
  .ec-barre .ec-nav__badge { position: absolute; top: 2px; left: 55%; margin: 0; }
  .ec-tuiles { grid-template-columns: 1fr; }
  .ec-contact { grid-template-columns: 1fr; }
  .ec-feuille__parties { grid-template-columns: 1fr; }
  .ec-feuille__titre { justify-items: start; text-align: left; }
  .ec-liste a { flex-wrap: wrap; }
  .ec-liste__txt { flex-basis: calc(100% - 60px); }
  .ec-liste a > .ec-ic { display: none; }
  .ec-bulle { max-width: 90%; }
}
@media print {
  body.ec { background: #fff !important; }
  .ec-cote, .ec-barre, .ec-doc__actions, .ec-toast { display: none !important; }
  .ec-app { display: block; }
  .ec-principal { padding: 0; }
  .ec-feuille { box-shadow: none; border-radius: 0; padding: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* Feuille A4 pleine page : texte plus grand, pied de page collé en bas */
  @page { size: A4; margin: 12mm 14mm; }
  .ec-principal { max-width: none !important; margin: 0 !important; }
  .ec-feuille { display: flex; flex-direction: column; gap: 4.5mm; min-height: 266mm; font-size: 10.5pt; line-height: 1.42; break-after: avoid; }
  .ec-feuille__logo { width: 27mm; }
  .ec-feuille__titre h2 { font-size: 22pt; }
  .ec-feuille__titre b { font-size: 12pt; }
  .ec-feuille__titre .ec-pastille { display: none; }
  .ec-feuille small { font-size: 8.5pt; }
  .ec-feuille__meta { padding: 3mm 5mm; gap: 2mm 12mm; font-size: 11pt; }
  .ec-feuille table { min-width: 0; font-size: 10.5pt; }
  .ec-feuille th { font-size: 8.5pt; padding: 2.5mm 3mm; }
  .ec-feuille td { padding: 2.5mm 3mm; }
  .ec-feuille__totaux { align-self: flex-end; width: 88mm; font-size: 11pt; }
  .ec-feuille__parties { grid-template-columns: 1fr 1fr !important; gap: 10mm; }
  .ec-feuille__titre { justify-items: end !important; text-align: right !important; }
  .ec-feuille__tete { flex-wrap: nowrap; }
  .ec-feuille__totaux div { padding: 1.8mm 3mm; }
  .ec-feuille__totaux .is-grand { font-size: 13pt; padding: 3mm 4mm; }
  .ec-feuille__bloc { padding: 3mm 5mm; }
  .ec-feuille .ec-petit { font-size: 9pt; }
  .ec-feuille__pied { margin-top: auto; font-size: 7.5pt; padding-top: 3mm; }
  .ec-feuille__tete { padding-bottom: 3mm; }
  .ec-feuille__parties p { line-height: 1.38; }
}

/* Plannings facturés (PDF à télécharger) */
.ec-carte__sous { color: var(--muted); font-size: 12.5px; }
.ec-telecharger { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 6px 12px; border-radius: 99px; background: var(--gold-grad); color: #0b0b0c; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.ec-telecharger .ec-ic { width: 15px; height: 15px; }

/* =========================================================
   THÈME BLANC 2.0 (blanc, noir, rouge) — la version bleu nuit
   reste disponible dans le dépôt (tag git v1.0)
   ========================================================= */
:root {
  --bg: #ffffff; --bg-2: #f7f3ec; --surface: #ffffff; --line: rgba(0, 0, 0, 0.08); --line-strong: rgba(0, 0, 0, 0.16);
  --text: #0b0b0c; --muted: #4a4a4f; --muted-2: #86868b; --rouge: #ac864a;
  --gold: #ac864a; --gold-light: #ac864a; --gold-grad: #ac864a;
  --font-display: "Manrope", "Inter", system-ui, sans-serif; --font-serif: var(--font-display);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
html { color-scheme: light; }
body.ec { background: var(--bg-2) !important; color: var(--muted); }
.ambient, .grain, #sky { display: none !important; }
.btn { border-radius: 999px !important; text-transform: none !important; letter-spacing: 0 !important; font-weight: 600 !important; transition: background-color 0.3s var(--ease), color 0.3s, transform 0.3s var(--ease) !important; }
.btn::before, .btn::after { display: none !important; }
.btn--gold { background: var(--or-degrade, var(--rouge)) !important; color: #0b0b0c !important; box-shadow: none !important; }
.btn--gold:hover { background: #90703e !important; transform: translateY(-1px); }
.btn--outline { background: #fff !important; color: var(--text) !important; border: 1px solid var(--line-strong) !important; }
.btn--outline:hover { background: var(--text) !important; color: #fff !important; }

/* Connexion */
.ec-auth { background: #fff; }
.ec-auth__visuel { background: var(--text) !important; color: #fff; }
.ec-auth__visuel::after { display: none; }
.ec-auth__slogan span { color: #d3bc97; letter-spacing: 0.12em; }
.ec-auth__slogan p { color: #fff; font-weight: 800; letter-spacing: -0.03em; font-size: clamp(26px, 3vw, 44px); line-height: 1.1; }
.ec-auth__slogan em { font-family: inherit; font-style: normal; color: #a1a1a6; font-weight: 800; }
.ec-auth__slogan { animation: ec-monte 1s var(--ease) both; }
.ec-auth__carte > * { animation: ec-monte 0.9s var(--ease) both; }
.ec-auth__carte > :nth-child(2) { animation-delay: 0.06s; }
.ec-auth__carte > :nth-child(3) { animation-delay: 0.12s; }
.ec-auth__carte > :nth-child(n + 4) { animation-delay: 0.18s; }
@keyframes ec-monte { from { opacity: 0; transform: translateY(22px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.ec-auth__marque small { color: var(--rouge); }
.ec-auth h1 { font-weight: 800; letter-spacing: -0.03em; font-size: 34px; }
.ec-auth__id b, .ec-auth__aide a, .ec-petit a, .ec-centre a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.ec-input { background: #fff !important; border: 1px solid var(--line-strong) !important; color: var(--text) !important; border-radius: 14px !important; }
.ec-input:focus { border-color: var(--text) !important; box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06) !important; }
.ec-erreur { color: #947440; }

/* Application */
.ec-cote { background: #fff !important; box-shadow: inset -1px 0 0 var(--line) !important; }
.ec-cote__marque small { color: var(--rouge); }
.ec-cote__client { border: 0 !important; background: var(--bg-2) !important; }
.ec-avatar { background: var(--text) !important; border-radius: 999px !important; }
.ec-nav__item { border-radius: 12px !important; color: var(--muted) !important; }
.ec-nav__item:hover { background: var(--bg-2) !important; color: var(--text) !important; }
.ec-nav__item.is-actif { background: var(--text) !important; color: #fff !important; box-shadow: none !important; }
.ec-nav__badge { background: var(--rouge) !important; color: #0b0b0c !important; }
.ec-cote__contact { border-color: var(--line) !important; color: var(--rouge) !important; }
.ec-vue { animation: ec-monte 0.6s var(--ease) both !important; }
.ec-entete p { color: var(--rouge) !important; letter-spacing: 0.1em !important; }
.ec-entete h1 { font-weight: 800; letter-spacing: -0.035em; font-size: clamp(28px, 4vw, 42px) !important; }
.ec-hero { border: 0 !important; background: var(--text) !important; border-radius: 28px !important; }
.ec-hero::before { display: none; }
.ec-hero p { color: #d3bc97 !important; letter-spacing: 0.1em !important; }
.ec-hero h1 { font-family: var(--font-display) !important; font-style: normal !important; font-weight: 800 !important; letter-spacing: -0.035em; color: #fff !important; }
.ec-hero > div > span { color: #a1a1a6 !important; }
.ec-hero__badge { background: rgba(62, 207, 142, 0.14) !important; color: #7fe0b2 !important; }
.ec-tuile { background: #fff !important; border: 0 !important; border-radius: 22px !important; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease) !important; }
.ec-tuile:hover { transform: translateY(-4px) !important; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.25) !important; }
.ec-tuile.is-alerte { background: #fff !important; box-shadow: inset 0 0 0 1.5px rgba(172, 134, 74, 0.4) !important; }
.ec-tuile__ic { background: var(--bg-2) !important; color: var(--text) !important; }
.ec-tuile.is-alerte .ec-tuile__ic { background: rgba(172, 134, 74, 0.1) !important; color: var(--rouge) !important; }
.ec-tuile b { font-weight: 800; letter-spacing: -0.03em; font-size: 26px !important; }
.ec-tuiles > *, .ec-vue > .ec-carte { animation: ec-monte 0.7s var(--ease) both; }
.ec-tuiles > :nth-child(2) { animation-delay: 0.06s; }
.ec-tuiles > :nth-child(3) { animation-delay: 0.12s; }
.ec-carte { background: #fff !important; border: 0 !important; border-radius: 22px !important; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important; }
.ec-carte h2 { font-weight: 800; letter-spacing: -0.02em; }
.ec-vide .ec-ic { color: var(--muted-2) !important; }
.ec-liste a { background: var(--bg-2) !important; border: 0 !important; border-radius: 16px !important; color: var(--text) !important; transition: background-color 0.25s, transform 0.35s var(--ease) !important; }
.ec-liste a:hover { background: #eee8dd !important; transform: translateX(4px) !important; }
.ec-liste a.is-nouveau { box-shadow: inset 3px 0 0 var(--rouge) !important; }
.ec-doc-ic { background: #fff !important; color: var(--text) !important; }
.ec-doc-ic--factures { color: var(--rouge) !important; }
.ec-nouveau, .ec-telecharger { background: var(--rouge) !important; }
.ec-pastille--attente { background: #fff1e6 !important; color: #b45a14 !important; }
.ec-pastille--ok { background: #e6f7ee !important; color: #1f7a4d !important; }
.ec-pastille--non { background: var(--bg-2) !important; color: var(--muted) !important; }
.ec-contact { background: #fff !important; }
.ec-bulle p { color: inherit !important; }
.ec-bulle--client { background: var(--text) !important; color: #fff !important; border: 0 !important; }
.ec-bulle--client small { color: #a1a1a6 !important; }
.ec-bulle--admin { background: var(--bg-2) !important; color: var(--text) !important; border: 0 !important; }
.ec-fil__envoi { background: #fff !important; border-color: var(--line) !important; }
.ec-retour:hover { color: var(--text) !important; }
.ec-feuille { box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.25) !important; }
.ec-toast { background: var(--text) !important; color: #fff !important; border: 0 !important; border-radius: 999px !important; }
.ec-chargement span { background: var(--text) !important; }
@media (max-width: 860px) {
  .ec-auth__visuel { background: var(--text) !important; padding: 34px 24px 30px !important; }
  .ec-barre { background: rgba(255, 255, 255, 0.92) !important; box-shadow: 0 -1px 0 var(--line) !important; }
  .ec-barre a { color: var(--muted-2) !important; }
  .ec-barre a.is-actif { color: var(--text) !important; background: var(--bg-2) !important; }
}
@media print { body.ec { background: #fff !important; } }
@media (prefers-reduced-motion: reduce) { .ec-auth__slogan, .ec-auth__carte > *, .ec-vue, .ec-tuiles > *, .ec-vue > .ec-carte { animation: none !important; } }
