/* ============================================
   EuroBank — Feuille de style globale
   Design : banque privée européenne, sobre, raffiné
   ============================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0a2540;
  --primary-light: #1a3a5c;
  --primary-dark: #061829;
  --accent: #c9a55a;
  --accent-light: #d9b977;
  --bg: #fafaf7;
  --bg-card: #ffffff;
  --bg-soft: #f4f2ec;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e2da;
  --border-dark: #d0ccc0;
  --success: #047857;
  --success-bg: #d1fae5;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --shadow-sm: 0 1px 2px rgba(10,37,64,0.05);
  --shadow: 0 4px 12px rgba(10,37,64,0.08);
  --shadow-lg: 0 20px 50px rgba(10,37,64,0.15);
  --radius: 6px;
  --radius-lg: 14px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

html, body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; color: var(--primary); }
h1 { font-size: clamp(2.2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: 1.35rem; }

p { margin-bottom: 1rem; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ============================================
   HEADER PUBLIC
   ============================================ */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.96);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

.brand { display: flex; align-items: center; gap: .75rem; font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--primary); }
.brand img, .brand-image { display:block; width:auto; max-width:min(240px,100%); max-height:52px; object-fit:contain; object-position:left center; }
.brand-mark {
  display: inline-flex; width: 38px; height: 38px;
  background: var(--primary); color: var(--accent);
  align-items: center; justify-content: center;
  border-radius: 50%; font-size: 1rem; font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: -.5px;
}

.site-nav { display: flex; gap: 2rem; }
.site-nav a {
  font-size: .95rem; color: var(--text); font-weight: 500;
  position: relative;
}
.site-nav a:hover { color: var(--accent); }

.header-actions { display: flex; gap: .75rem; align-items: center; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .65rem 1.25rem; font-size: .9rem; font-weight: 500;
  border: 1px solid transparent; border-radius: var(--radius); cursor: pointer;
  transition: all .2s; font-family: inherit; line-height: 1;
  text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--border-dark); }
.btn-outline:hover { border-color: var(--primary); background: var(--bg-soft); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { color: var(--accent); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #065f46; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #991b1b; color: #fff; }
.btn-lg { padding: .9rem 1.75rem; font-size: 1rem; }
.btn-sm { padding: .4rem .75rem; font-size: .8rem; }
.btn-block { width: 100%; }

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 5rem 0 6rem;
  background:
    radial-gradient(ellipse 80% 60% at 80% 0%, rgba(201,165,90,0.08), transparent),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: 0; right: 0; width: 50%; height: 100%;
  background: radial-gradient(circle at top right, rgba(10,37,64,0.04), transparent 70%);
  pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; align-items: center; position: relative; }
.eyebrow {
  display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .15em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1.25rem;
}
.hero h1 { margin-bottom: 1.5rem; }
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 500; }
.lead { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 2rem; max-width: 500px; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.hero-trust div { display: flex; flex-direction: column; }
.hero-trust strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--primary); }
.hero-trust span { font-size: .8rem; color: var(--text-muted); }

/* ============================================
   BANKCARD VISUEL
   ============================================ */
.bankcard {
  position: relative; aspect-ratio: 1.586/1; max-width: 420px;
  padding: 1.75rem; border-radius: var(--radius-lg);
  background: var(--card-bg, var(--primary));
  color: var(--card-text, #fff); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; justify-content: space-between;
  font-family: var(--font-body);
  overflow: hidden;
}
.bankcard::before {
  content: ''; position: absolute; top: -50%; right: -30%; width: 100%; height: 200%;
  background: radial-gradient(circle, rgba(201,165,90,0.25), transparent 50%);
  pointer-events: none;
}
.bankcard.small { max-width: 320px; padding: 1.25rem; }
.bankcard.large { max-width: 480px; }
.bankcard-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; }
.bankcard-bank { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--card-text, #fff); letter-spacing: .5px; }
.bankcard-logo { display:block; width:auto; max-width:170px; max-height:48px; object-fit:contain; object-position:left center; }
.bankcard-chip {
  width: 42px; height: 32px; border-radius: 5px;
  background: linear-gradient(135deg, #d4af37 0%, #a88a2e 100%);
  position: relative;
}
.bankcard-chip::before, .bankcard-chip::after {
  content: ''; position: absolute; background: rgba(0,0,0,0.2);
}
.bankcard-chip::before { top: 8px; left: 4px; right: 4px; height: 1px; }
.bankcard-chip::after { left: 20px; top: 4px; bottom: 4px; width: 1px; }
.bankcard-number {
  font-family: 'Courier New', monospace; font-size: 1.35rem;
  letter-spacing: 2px; position: relative; font-weight: 500;
}
.bankcard.small .bankcard-number { font-size: 1.1rem; }
.bankcard-bottom { display: flex; justify-content: space-between; align-items: flex-end; position: relative; }
.bankcard-bottom .label { font-size: .65rem; text-transform: uppercase; opacity: .6; letter-spacing: .1em; display: block; }
.bankcard-bottom .value { font-size: .85rem; font-weight: 500; }
.bankcard-network {
  font-family: var(--font-display); font-style: italic; font-size: 1.5rem;
  font-weight: 700; color: var(--card-text, #fff); letter-spacing: 1px;
}

/* ============================================
   SECTIONS PUBLIQUES
   ============================================ */
.section-head { text-align: center; max-width: 700px; margin: 0 auto 4rem; }
.section-head h2 { margin-top: .5rem; }

.services { padding: 6rem 0; background: var(--bg-card); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.service-card {
  padding: 2rem; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); transition: all .3s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.service-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--service-icon-bg, var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: var(--service-icon-text, #fff); font-size: 1.5rem; margin-bottom: 1.25rem;
}
.service-card h3 { margin-bottom: .5rem; }
.service-card p { color: var(--public-text, var(--text-muted)); font-size: .95rem; margin: 0; }

.about { padding: 6rem 0; background: var(--bg-soft); }
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat {
  background: var(--bg-card); padding: 1.75rem;
  border-radius: var(--radius-lg); text-align: center;
  border-top: 3px solid var(--accent);
}
.stat strong { font-family: var(--font-display); font-size: 2.25rem; color: var(--primary); display: block; }
.stat span { font-size: .85rem; color: var(--text-muted); }

.check-list { list-style: none; padding: 0; }
.check-list li { padding: .5rem 0; padding-left: 1.75rem; position: relative; }
.check-list li::before {
  content: '✓'; position: absolute; left: 0; top: .5rem;
  color: var(--accent); font-weight: 700;
}

.contact { padding: 6rem 0; }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.contact-info { display: grid; gap: 1.5rem; }
.contact-info > div { padding: 1.5rem; background: var(--contact-card-bg, var(--bg-soft)); border-radius: var(--radius); }
.contact-info .label { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--contact-label, var(--accent)); margin-bottom: .35rem; }
.contact-info strong { font-size: 1.05rem; color: var(--contact-value, var(--primary)); }
.contact > .container > div:first-child > p { color: var(--public-text, var(--text)); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer { background: var(--footer-bg, var(--primary-dark)); color: var(--footer-text, #fff); padding: 4rem 0 0; }
.site-footer .brand { color: var(--footer-text, #fff); margin-bottom: 1rem; }
.site-footer .brand-image { max-height:64px; filter:none; }
.brand-image-on-light { background:rgba(255,255,255,.96); padding:.45rem .65rem; border-radius:10px; }
.site-footer .brand-mark { background: var(--accent); color: var(--primary); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 3rem; padding-bottom: 3rem; }
.footer-col h4 { color: var(--footer-text, #fff); font-family: var(--font-body); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
.footer-col a { display: block; padding: .35rem 0; color: var(--footer-text, #fff); opacity:.82; font-size: .9rem; }
.footer-col a:hover { color: var(--accent); }
.footer-col p { color: var(--footer-text, #fff); opacity:.82; font-size: .9rem; margin-bottom: .35rem; }
.footer-bottom { border-top: 1px solid currentColor; padding: 1.5rem 0; font-size: .85rem; color: var(--footer-text, #fff); opacity:.78; }

/* ============================================
   AUTH (login / register)
   ============================================ */
.auth-section { padding: 4rem 0; min-height: calc(100vh - 80px); }
.login-page .auth-section {
  min-height: calc(100dvh - 82px);
  display: flex;
  align-items: center;
  padding-top: 2.75rem;
  padding-bottom: 2.75rem;
}
.login-page .auth-grid { width: 100%; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.auth-side h1 { margin: 1rem 0; }
.auth-side p { color: var(--text-muted); }
.steps { list-style: none; counter-reset: step; margin-top: 2.5rem; }
.steps li {
  padding: 1rem 0 1rem 3.25rem; position: relative;
  border-left: 2px solid var(--border); margin-left: 1rem;
  color: var(--text-muted);
}
.steps li span {
  position: absolute; left: -1.1rem; top: .85rem;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--bg-card); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-family: var(--font-display); font-size: 1rem;
}
.steps li.active { color: var(--primary); font-weight: 500; }
.steps li.active span { background: var(--accent); border-color: var(--accent); color: #fff; }

.auth-form-wrap {
  background: var(--bg-card); padding: 2.5rem;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.auth-form { display: grid; gap: 1.25rem; }
.auth-form label, .grid-form label {
  display: flex; flex-direction: column; gap: .35rem;
  font-size: .85rem; color: var(--text); font-weight: 500;
}
.auth-form input, .auth-form select, .auth-form textarea,
.grid-form input, .grid-form select, .grid-form textarea,
.transfer-form input, .kyc-form input,
.search-bar input, .inline-form input,
.settings-form input, .settings-form select, .settings-form textarea {
  padding: .75rem 1rem; border: 1px solid var(--border-dark);
  border-radius: var(--radius); font-family: inherit; font-size: .95rem;
  background: var(--bg-card); transition: all .2s;
  width: 100%;
}
.auth-form input:focus, .grid-form input:focus, .transfer-form input:focus, .inline-form input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,165,90,0.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.auth-foot { text-align: center; font-size: .9rem; color: var(--text-muted); margin-top: 1rem; }
.auth-foot a { color: var(--accent); font-weight: 500; }

/* ============================================
   FLASH
   ============================================ */
.flash {
  padding: 1rem 1.25rem; border-radius: var(--radius);
  margin: 1rem 0; font-size: .9rem; border-left: 4px solid;
}
.flash-success { background: var(--success-bg); border-color: var(--success); color: #065f46; }
.flash-error   { background: var(--danger-bg);  border-color: var(--danger);  color: #991b1b; }
.flash-info    { background: #dbeafe; border-color: #3b82f6; color: #1e40af; }
.app-flash {
  margin: 1.5rem 2rem; padding: 1rem 1.25rem; border-radius: var(--radius);
  border-left: 4px solid;
}
.app-flash.flash-success { background: var(--success-bg); border-color: var(--success); color: #065f46; }
.app-flash.flash-error   { background: var(--danger-bg);  border-color: var(--danger);  color: #991b1b; }
.app-flash.flash-info    { background: #dbeafe; border-color: #3b82f6; color: #1e40af; }

/* ============================================
   APP LAYOUT (client + admin)
   ============================================ */
.app-body { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; width:100%; max-width:100vw; overflow-x:hidden; }
.app-sidebar {
  background: var(--sidebar-bg, var(--primary)); color: var(--sidebar-text, #fff);
  display: flex; flex-direction: column;
  padding: 2rem 1.5rem; position: sticky; top: 0; height: 100vh; height:100dvh;
  overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin;
}
.admin-sidebar { background: var(--primary-dark); }
.app-brand {
  display: flex; align-items: center; gap: .75rem;
  font-family: var(--font-display); font-size: 1.35rem; color: #fff;
  margin-bottom: 2.5rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.app-brand .brand-mark { background: var(--accent); color: var(--primary); }
.app-brand .brand-image { max-width:100%; max-height:58px; }
.current-favicon img { object-fit:contain; border-radius:12px; background:#fff; border:1px solid var(--border); padding:4px; }
.current-logo-dark { background:var(--primary-dark); color:#fff; }
.current-logo-dark img { display:block; max-height:80px; max-width:260px; object-fit:contain; }
.current-logo-dark label { color:#fff; }

.app-nav { display: flex; flex-direction: column; gap: .25rem; flex-grow: 1; }
.app-nav a {
  padding: .85rem 1rem; border-radius: var(--radius);
  color: var(--sidebar-text, #fff); opacity:.78; font-size: .9rem; font-weight: 500;
  transition: all .2s;
}
.app-nav a:hover { background: rgba(255,255,255,0.09); color: var(--sidebar-text, #fff); opacity:1; }
.app-nav a.active { background: rgba(255,255,255,0.14); color: var(--sidebar-text, #fff); opacity:1; }

.app-sidebar-foot { padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); }
.app-sidebar-foot .btn-outline {
  color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.2);
}
.app-sidebar-foot .btn-ghost { color:rgba(255,255,255,.82); }
.app-sidebar-foot .btn-ghost:hover { color:#fff; background:rgba(255,255,255,.08); }
.app-sidebar-foot .btn-outline:hover { background: rgba(255,255,255,0.05); color: #fff; }

.app-main { background: var(--bg); min-width:0; width:100%; overflow-x:hidden; }
.app-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem 2rem; background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.topbar-hello { display: block; font-size: .8rem; color: var(--text-muted); }
.app-topbar strong { font-size: 1.05rem; color: var(--primary); }

.app-content { padding: 2rem; width:100%; max-width:1600px; margin:0 auto; min-width:0; }
.page-title { font-size: 2rem; margin-bottom: .35rem; }
.page-sub { color: var(--text-muted); margin-bottom: 2rem; }
.back-link { margin-bottom: 1rem; }
.back-link a { color: var(--text-muted); font-size: .9rem; }
.back-link a:hover { color: var(--accent); }

/* ============================================
   BADGES & ALERTES
   ============================================ */
.badge {
  display: inline-block; padding: .25rem .65rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warn    { background: var(--warn-bg);    color: var(--warn); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }

.alert-card {
  background: var(--bg-card); padding: 2rem; border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent); margin-bottom: 1.5rem; box-shadow: var(--shadow-sm);
}
.alert-card.success { border-color: var(--success); }
.alert-card.warn    { border-color: var(--warn); }
.alert-card.danger  { border-color: var(--danger); }
.alert-card h3 { margin-bottom: .5rem; }

/* ============================================
   CARDS / INFO BLOCKS
   ============================================ */
.info-card {
  background: var(--bg-card); padding: 2rem; border-radius: var(--radius-lg);
  border: 1px solid var(--border); margin-bottom: 1.5rem; box-shadow: var(--shadow-sm);
}
.info-card h3 { margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); }
.info-row {
  display: flex; justify-content: space-between; padding: .65rem 0;
  border-bottom: 1px solid var(--border); font-size: .95rem;
}
.info-row:last-child { border-bottom: none; }
.info-row span { color: var(--text-muted); }
.info-row strong { color: var(--primary); font-weight: 500; font-family: 'Courier New', monospace; }
.account-detail { align-items: center; gap: 1.25rem; }
.account-detail > span { flex: 0 1 44%; line-height: 1.35; }
.account-value {
  flex: 1 1 56%;
  min-width: 0;
  text-align: right;
  color: var(--primary)!important;
  font-family: 'Courier New', monospace!important;
  font-size: clamp(.95rem, 1.35vw, 1.08rem);
  font-weight: 500!important;
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1.4;
  letter-spacing: .045em;
  overflow-wrap: anywhere;
}
.account-number,.account-code { font-size:inherit; }
.account-identifier { font-size:clamp(.86rem,1.2vw,1rem); letter-spacing:.04em; }
.account-currency { font-weight:500; font-size:1rem; }

.dashboard-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.5rem; margin-bottom: 1.5rem;
}
.dashboard-grid > *, .stats-grid > *, .info-card { min-width:0; }

.balance-card {
  background: var(--dashboard-banner-bg, var(--primary));
  color: var(--dashboard-banner-text, #fff); padding: 2.5rem; border-radius: var(--radius-lg);
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.balance-card::after {
  content: ''; position: absolute; bottom: -50%; right: -10%;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,165,90,0.15), transparent 70%);
  pointer-events: none;
}
.balance-card .eyebrow { color: var(--dashboard-banner-text, #fff); }
.balance-card h2 {
  color:var(--dashboard-banner-text, #fff);
  margin-top:.5rem;
  font-family:var(--font-body);
  font-size:3rem;
  font-weight:700;
  line-height:1.08;
  letter-spacing:-.035em;
  font-variant-numeric:tabular-nums lining-nums;
}
.balance-actions { display: flex; gap: .75rem; position: relative; }
.balance-card .btn-outline { color: var(--dashboard-banner-text, #fff); border-color: currentColor; }
.balance-card .btn-outline:hover { background: rgba(255,255,255,0.08); border-color: var(--accent); color: var(--accent); }
.balance-card .btn-primary { background: var(--accent); color: var(--primary); }
.balance-card .btn-primary:hover { background: var(--accent-light); }

.card-display { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: start; margin-bottom: 2rem; }
.card-details { background: var(--bg-card); padding: 1.5rem; border-radius: var(--radius-lg); border: 1px solid var(--border); }

.card-preview p.muted { margin-top: 1rem; font-family: 'Courier New', monospace; }

/* ============================================
   TABLES
   ============================================ */
.data-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: var(--radius); overflow: hidden; }
.data-table thead { background: var(--bg-soft); }
.data-table th { padding: .85rem 1rem; text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); }
.data-table td { padding: 1rem; border-bottom: 1px solid var(--border); font-size: .9rem; }
.data-table tbody tr:hover { background: var(--bg-soft); }
.data-table.compact td, .data-table.compact th { padding: .65rem .85rem; }
.ta-right { text-align: right; }
.amt-pos { color: var(--success); font-weight: 600; }
.amt-neg { color: var(--danger); font-weight: 600; }

.section-head-small { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.section-head-small h3 { margin: 0; padding: 0; border: none; }
.recent-transactions { margin-top: 2rem; }

/* ============================================
   STATS GRID (admin dashboard)
   ============================================ */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg-card); padding: 1.5rem; border-radius: var(--radius-lg);
  border: 1px solid var(--border); display: flex; flex-direction: column; gap: .35rem;
}
.stat-card.stat-highlight {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; border: none;
}
.stat-card.stat-highlight .stat-label { color: rgba(255,255,255,0.7); }
.stat-card.stat-highlight .stat-value { color: var(--accent); }
.stat-label { font-size: .8rem; color: var(--text-muted); }
.stat-value { font-family: var(--font-display); font-size: 2rem; color: var(--primary); }
.stat-link { font-size: .8rem; color: var(--accent); margin-top: auto; }

/* Les écrans intermédiaires et les navigateurs zoomés ne doivent jamais
   conserver deux tableaux trop larges côte à côte. */
@media (max-width: 1500px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-grid .info-card { overflow:hidden; }
  .dashboard-grid .data-table { display:block; max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .app-body { grid-template-columns:230px minmax(0,1fr); }
  .app-sidebar { padding:1.5rem 1rem; }
  .app-nav a { padding:.72rem .75rem; font-size:.82rem; }
  .app-content { padding:1.5rem; }
  .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* ============================================
   FORMS — grid & inline
   ============================================ */
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-form .full { grid-column: 1 / -1; }
.grid-form .form-actions { grid-column: 1 / -1; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
.inline-form input { flex: 1; min-width: 150px; padding: .55rem .85rem; }
.checkbox-label { flex-direction: row !important; align-items: center; gap: .5rem !important; }
.checkbox-label input { width: auto; }
.form-actions { display: flex; gap: .75rem; margin-top: 1rem; }

.search-bar { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.search-bar input { flex: 1; }

.filter-bar { display: flex; gap: .5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.filter-bar a {
  padding: .45rem 1rem; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: .85rem; color: var(--text-muted);
}
.filter-bar a:hover { color: var(--primary); border-color: var(--primary); }
.filter-bar a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================
   KYC
   ============================================ */
.kyc-form { display: grid; gap: 1.5rem; max-width: 700px; }
.kyc-step { padding: 1.5rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.kyc-step h3 { margin-bottom: .5rem; padding: 0; border: none; }
.kyc-step .muted { font-size: .85rem; margin-bottom: 1rem; }
.kyc-step input[type=file] {
  border: 2px dashed var(--border-dark); padding: 1.25rem; border-radius: var(--radius);
  width: 100%; cursor: pointer; background: var(--bg-soft);
}

.kyc-review-card { background: var(--bg-card); padding: 1.75rem; border-radius: var(--radius-lg); border: 1px solid var(--border); margin-bottom: 1rem; }
.kyc-review-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.kyc-files { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1rem 0; }
.kyc-file {
  display: flex; flex-direction: column; padding: 1rem 1.5rem;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .85rem; flex: 1; min-width: 180px;
}
.kyc-file span { font-weight: 600; color: var(--primary); }
.kyc-file small { color: var(--accent); margin-top: .25rem; }
.kyc-file:hover { border-color: var(--accent); }
.kyc-thumb {
  height: 180px; margin: .85rem 0 .35rem; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff;
}
.kyc-thumb img {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.kyc-pdf-preview {
  height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .35rem;
  color: var(--text-muted);
}
.kyc-pdf-preview strong {
  font-size: 1.1rem; color: var(--primary);
}
.kyc-pdf-preview small {
  margin: 0; color: var(--text-muted);
}
.kyc-note { background: var(--warn-bg); padding: .75rem 1rem; border-radius: var(--radius); font-size: .9rem; margin: 1rem 0; }
.kyc-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }
.kyc-actions input { flex: 1; min-width: 200px; padding: .55rem .85rem; }

/* ============================================
   TRANSFERT — PROGRESS BAR
   ============================================ */
.transfer-form { display: grid; gap: 1rem; max-width: 700px; background: var(--bg-card); padding: 2rem; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.transfer-summary { display: flex; justify-content: space-between; padding: 1rem; background: var(--bg-soft); border-radius: var(--radius); margin: .5rem 0; }
.transfer-summary strong { color: var(--success); font-family: 'Courier New', monospace; }
.transfer-code-form { display: grid; gap: .9rem; max-width: 360px; margin-top: 1rem; }
.transfer-code-form label { display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; color: var(--text); font-weight: 600; }
.transfer-code-form input {
  padding: .75rem 1rem; border: 1px solid var(--border-dark);
  border-radius: var(--radius); font: inherit; text-transform: uppercase;
}

.transfer-progress {
  background: var(--bg-card); padding: 3rem 2.5rem; border-radius: var(--radius-lg);
  border: 1px solid var(--border); max-width: 700px;
}
.progress-head { text-align: center; margin-bottom: 2.5rem; }
.progress-head h2 { margin: .5rem 0; }
.progress-wrap { margin-bottom: 2rem; }
.progress-bar {
  height: 14px; background: var(--bg-soft); border-radius: 999px; overflow: hidden;
  border: 1px solid var(--border);
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .8s ease;
  border-radius: 999px;
  position: relative;
}
.progress-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.progress-meta { display: flex; justify-content: space-between; margin-top: .75rem; font-size: .9rem; color: var(--text-muted); }
.progress-meta #progPct { font-family: var(--font-display); font-size: 1.5rem; color: var(--primary); }

.mini-progress { width: 100px; height: 6px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.mini-progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); }

.unlock-code {
  display: inline-block; padding: .25rem .65rem;
  background: #0b1f33!important;
  color: #ffffff!important;
  border: 1px solid #334e68;
  font-family: 'Courier New', monospace; font-weight: 700;
  border-radius: var(--radius); font-size: .85rem; letter-spacing: 1px;
  text-shadow: none!important;
  -webkit-text-fill-color: #ffffff;
}
.unlock-code-button {
  cursor: pointer; margin-top: .25rem;
}
.unlock-code-button:hover,
.unlock-code-button:focus-visible {
  background: #163a5f!important;
  color: #ffffff!important;
  -webkit-text-fill-color: #ffffff;
  outline: 2px solid #f4b942;
  outline-offset: 2px;
}
.unlock-code::selection { background:#2563eb; color:#ffffff; }

/* ============================================
   ASSISTANCE — messagerie client/admin
   ============================================ */
.support-title-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1.5rem; }
.support-presence { display:inline-flex; align-items:center; gap:.5rem; padding:.55rem .9rem; background:var(--success-bg); color:var(--success); border-radius:999px; font-size:.8rem; font-weight:700; }
.support-presence i { width:8px; height:8px; background:var(--success); border-radius:50%; box-shadow:0 0 0 4px rgba(5,150,105,.12); }
.support-shell { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; box-shadow:var(--shadow-sm); min-width:0; }
.support-shell-client { max-width:960px; margin:0 auto; }
.support-chat-head { min-height:78px; padding:1rem 1.25rem; display:flex; align-items:center; gap:.8rem; border-bottom:1px solid var(--border); background:linear-gradient(135deg,#fff,var(--bg-soft)); }
.support-chat-head>div:nth-child(2) { display:flex; flex-direction:column; gap:.2rem; flex:1; min-width:0; }
.support-chat-head span { color:var(--text-muted); font-size:.8rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.support-avatar { width:44px; height:44px; border-radius:14px; display:grid; place-items:center; flex:none; color:#fff; background:linear-gradient(135deg,var(--primary),var(--accent)); font-weight:800; }
.support-avatar-brand { overflow:hidden; background:#fff; border:1px solid var(--border); }
.support-avatar-brand img { width:100%; height:100%; object-fit:contain; padding:4px; }
.support-avatar.small { width:38px; height:38px; border-radius:12px; font-size:.75rem; }
.support-messages { height:480px; overflow-y:auto; padding:1.5rem; background:linear-gradient(180deg,#f8fafc,#fff); display:flex; flex-direction:column; gap:1rem; }
.support-message { max-width:75%; display:flex; flex-direction:column; gap:.3rem; }
.support-message.mine { align-self:flex-end; align-items:flex-end; }
.support-message.agent { align-self:flex-start; }
.support-message-meta { font-size:.7rem; color:var(--text-muted); padding:0 .25rem; }
.support-bubble { padding:.85rem 1rem; border:1px solid var(--border); border-radius:5px 16px 16px 16px; background:#fff; line-height:1.55; overflow-wrap:anywhere; }
.support-message.mine .support-bubble { color:#fff; background:var(--primary); border-color:var(--primary); border-radius:16px 5px 16px 16px; }
.support-composer { padding:1rem 1.25rem; border-top:1px solid var(--border); background:#fff; }
.support-composer>input { width:100%; margin-bottom:.65rem; }
.support-compose-row { display:flex; gap:.75rem; align-items:stretch; }
.support-compose-row textarea { flex:1; resize:none; min-height:74px; }
.support-compose-row button { min-width:120px; }
.support-composer>small { display:block; color:var(--text-muted); margin-top:.55rem; }
.support-attach-button { display:inline-flex; align-items:center; gap:.5rem; max-width:100%; margin-top:.7rem; padding:.55rem .8rem; border:1px solid var(--border); border-radius:10px; color:var(--primary); background:#f8fafc; font-size:.86rem; font-weight:600; cursor:pointer; transition:.2s; }
.support-attach-button:hover { border-color:var(--accent); background:#fffaf0; }
.support-attach-button span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.support-attach-button input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.support-attachment { display:flex; overflow:hidden; border:1px solid var(--border); border-radius:14px; background:#fff; color:var(--primary); text-decoration:none; box-shadow:0 5px 18px rgba(9,42,70,.08); }
.support-image { flex-direction:column; max-width:330px; }
.support-image img { display:block; width:auto; max-width:330px; max-height:250px; object-fit:cover; }
.support-image span,.support-media>a { padding:.55rem .75rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.78rem; font-weight:600; }
.support-media { flex-direction:column; padding:.45rem; max-width:380px; }
.support-media video { width:100%; max-height:260px; border-radius:9px; background:#071c2e; }
.support-media audio { width:320px; max-width:100%; }
.support-file { align-items:center; gap:.75rem; min-width:220px; padding:.8rem; }
.support-file>strong { display:grid; place-items:center; width:44px; height:44px; flex:none; border-radius:9px; color:#fff; background:#c82828; font-size:.72rem; }
.support-file>span { display:flex; min-width:0; flex-direction:column; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.support-file small { color:var(--text-muted); font-weight:400; }
.support-message.mine .support-attachment { border-color:rgba(9,42,70,.2); }
.support-empty { flex:1; min-height:220px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:.5rem; color:var(--text-muted); padding:2rem; }
.support-empty.small { min-height:140px; }
.support-admin-grid { display:grid; grid-template-columns:310px minmax(0,1fr); gap:1rem; min-height:640px; }
.support-thread-list { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg); overflow:auto; max-height:640px; }
.support-list-head { display:flex; justify-content:space-between; padding:1.15rem; border-bottom:1px solid var(--border); }
.support-list-head span { background:var(--bg-soft); padding:.15rem .5rem; border-radius:999px; font-size:.75rem; }
.support-thread { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:.7rem; padding:1rem; border-bottom:1px solid var(--border); color:inherit; }
.support-thread:hover,.support-thread.active { background:var(--bg-soft); }
.support-thread.active { box-shadow:inset 3px 0 var(--accent); }
.support-thread>div:nth-child(2) { display:flex; flex-direction:column; min-width:0; }
.support-thread span,.support-thread small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-muted); font-size:.73rem; }
.support-unread { min-width:22px; height:22px; padding:0 .35rem; display:grid; place-items:center; border-radius:999px; background:var(--danger); color:#fff; font-size:.7rem; }
@media(max-width:900px){.support-admin-grid{grid-template-columns:1fr}.support-thread-list{max-height:260px}.support-messages{height:420px}.support-message{max-width:88%}}
@media(max-width:600px){.support-compose-row{flex-direction:column}.support-compose-row button{width:100%}.support-title-row{align-items:flex-start;flex-direction:column}}

@media(max-width:600px){
  .support-page,.support-shell-client,.support-chat-head,.support-messages,.support-composer{width:100%;max-width:100%;min-width:0}
  .support-page{padding:.75rem!important}
  .support-title-row{width:100%;gap:.8rem;margin-bottom:1rem}
  .support-title-row>div{width:100%;min-width:0}
  .support-title-row .page-title,.support-title-row .page-sub{max-width:100%;overflow-wrap:anywhere}
  .support-presence{max-width:100%;white-space:normal}
  .support-shell-client{margin:0;border-radius:14px}
  .support-chat-head{display:grid;grid-template-columns:auto minmax(0,1fr);padding:.8rem;gap:.65rem}
  .support-chat-head>.badge{grid-column:1/-1;justify-self:start;max-width:100%;white-space:normal;line-height:1.25;text-align:left}
  .support-messages{height:min(58dvh,440px);padding:.8rem;gap:.8rem}
  .support-message{min-width:0;max-width:92%}
  .support-message-meta{max-width:100%;font-size:.66rem;line-height:1.35;overflow-wrap:anywhere;white-space:normal}
  .support-bubble,.support-attachment,.support-image,.support-image img,.support-media,.support-file{min-width:0;max-width:100%}
  .support-bubble{padding:.72rem .8rem}
  .support-composer{padding:.8rem}
}

.public-support-section { padding:4rem 0 5rem; background:linear-gradient(180deg,var(--bg-soft),#fff); min-height:75vh; }
.public-support-intro { text-align:center; max-width:720px; margin:0 auto 2rem; }
.public-support-intro h1 { margin:.6rem 0; }
.guest-support-card { max-width:1040px; margin:0 auto; display:grid; grid-template-columns:360px minmax(0,1fr); background:#fff; border:1px solid var(--border); border-radius:24px; overflow:hidden; box-shadow:0 24px 60px rgba(10,37,64,.12); }
.guest-support-aside { padding:2.5rem; color:#fff; background:linear-gradient(150deg,var(--primary),#123e66); }
.guest-support-aside .support-avatar { background:linear-gradient(135deg,var(--accent),#f2d48f); color:var(--primary); margin-bottom:1.5rem; }
.guest-support-aside h2 { color:#fff; margin-bottom:.75rem; }
.guest-support-aside p { color:rgba(255,255,255,.75); line-height:1.6; }
.guest-support-aside ul { list-style:none; padding:0; margin:2rem 0 0; display:grid; gap:.8rem; }
.guest-support-aside li::before { content:'✓'; margin-right:.65rem; color:var(--accent); font-weight:800; }
.guest-support-form { padding:2.25rem; display:grid; gap:1rem; }
.professional-field { display:grid; gap:.45rem; }
.professional-field label { font-size:.8rem; font-weight:700; color:var(--primary); }
.field-control { display:flex; align-items:center; border:1px solid var(--border-dark); border-radius:12px; background:#fff; overflow:hidden; transition:.2s; }
.field-control:focus-within { border-color:var(--accent); box-shadow:0 0 0 4px rgba(201,165,90,.14); }
.field-control>span { width:46px; display:grid; place-items:center; color:var(--accent); font-weight:800; }
.field-control input { flex:1; border:0 !important; outline:0; box-shadow:none !important; padding:.85rem .8rem .85rem 0 !important; background:transparent; font:inherit; }
.professional-field textarea,.support-composer input,.support-composer textarea { width:100%; border:1px solid var(--border-dark); border-radius:12px; padding:.85rem 1rem; font:inherit; color:var(--text); background:#fff; outline:0; transition:.2s; }
.professional-field textarea:focus,.support-composer input:focus,.support-composer textarea:focus { border-color:var(--accent); box-shadow:0 0 0 4px rgba(201,165,90,.14); }
.guest-support-form>small { color:var(--text-muted); line-height:1.5; }
.public-chat { max-width:920px; margin:0 auto; }
@media(max-width:800px){.guest-support-card{grid-template-columns:1fr}.guest-support-aside{padding:2rem}.guest-support-form{padding:1.5rem}}

.action-form { display: flex; gap: .35rem; flex-wrap: wrap; }

/* ============================================
   ADMIN — divers
   ============================================ */
.order-card-form { max-width: 600px; }
.order-card-block { background: var(--bg-card); padding: 2.5rem; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.order-card-block h3 { margin-bottom: 1rem; }
.payment-instruction {
  margin: 1.25rem 0; padding: 1rem; border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: var(--radius);
  background: var(--bg-soft);
}
.payment-label {
  display: block; margin-bottom: .75rem; font-weight: 700; color: var(--primary);
}
.payment-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .75rem;
}
.payment-grid small {
  display: block; color: var(--text-muted); margin-bottom: .2rem;
}
.payment-grid strong {
  display: block; color: var(--primary); overflow-wrap: anywhere;
}
.payment-proof-label {
  display: flex; flex-direction: column; gap: .4rem; margin: 1.25rem 0;
  font-weight: 600; color: var(--primary);
}
.payment-proof-label input {
  border: 2px dashed var(--border-dark); padding: 1rem;
  border-radius: var(--radius); background: var(--bg-soft);
}
.payment-review { margin: 1rem 0; }
.balance-admin {
  margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.balance-current { display: flex; justify-content: space-between; padding: 1rem; background: var(--bg-soft); border-radius: var(--radius); margin-bottom: 1rem; }
.balance-current strong { font-family: var(--font-display); font-size: 1.5rem; color: var(--primary); }
.sepa-block-admin {
  margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.sepa-block-admin h4 {
  margin-bottom: .35rem; color: var(--primary); font-size: 1.05rem;
}
.sepa-block-form {
  margin-top: 1rem;
}
.settings-form { display: grid; gap: 1.5rem; }
.current-logo { display: flex; gap: 1.5rem; align-items: center; margin-bottom: 1rem; padding: 1rem; background: var(--bg-soft); border-radius: var(--radius); }
.sticky-actions { position: sticky; bottom: 1rem; background: var(--bg-card); padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; justify-content: flex-end; }

.app-status { text-align: right; }

.muted { color: var(--text-muted); }
.small { font-size: .85rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero-inner, .about-inner, .contact-inner, .auth-grid { grid-template-columns: 1fr; }
  .hero-card { display: flex; justify-content: center; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .app-body { grid-template-columns: 1fr; }
  .app-sidebar { position: relative; height: auto; padding: 1rem; min-width: 0; }
  .app-brand { margin-bottom: .75rem; padding-bottom: .75rem; }
  .app-nav { flex-direction: row; flex-wrap: nowrap; gap: .35rem; overflow-x: auto; padding-bottom: .35rem; scrollbar-width: thin; }
  .app-nav a { padding: .5rem .85rem; font-size: .8rem; }
  .app-sidebar-foot { display:flex; gap:.5rem; padding-top:.75rem; }
  .app-sidebar-foot .btn { width:auto; flex:1; }
  .card-display { grid-template-columns: 1fr; }
  .hero-trust { grid-template-columns: repeat(2, 1fr); }
  .form-row, .grid-form, .payment-grid { grid-template-columns: 1fr; }
  .balance-card { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
}
@media (max-width: 600px) {
  .site-nav { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-trust { grid-template-columns: 1fr 1fr; }
  .app-content { padding: 1rem; }
  .app-topbar { padding: 1rem; gap:.75rem; align-items:flex-start; }
  .app-status { gap:.45rem; flex-wrap:wrap; justify-content:flex-end; }
  .app-status .badge { font-size:.62rem; }
  .info-card, .alert-card, .transfer-form, .transfer-progress, .order-card-block { padding:1.15rem; max-width:100%; }
  .balance-card { padding:1.35rem; }
  .balance-card h2 { font-size:2.15rem; overflow-wrap:anywhere; }
  .balance-actions { width:100%; flex-wrap:wrap; }
  .balance-actions .btn { flex:1; }
  .page-title { font-size:1.65rem; }
  .page-sub { margin-bottom:1.25rem; }
  .login-page .auth-section {
    min-height: calc(100dvh - 76px);
    padding-top: 1.5rem;
    padding-bottom: 1.75rem;
  }
  .search-bar { flex-direction:column; }
  .search-bar .btn { width:100%; }
  .form-actions { flex-direction:column; }
  .form-actions .btn { width:100%; }
  .info-row, .transfer-summary, .balance-current { gap:.65rem; align-items:flex-start; }
  .info-row strong, .transfer-summary strong, .balance-current strong { text-align:right; overflow-wrap:anywhere; }
  .account-detail { display:grid; grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr); gap:.6rem; padding:.82rem 0; }
  .account-detail > span { min-width:0; }
  .account-value { font-size:.94rem; line-height:1.45; letter-spacing:.04em; }
  .account-number { font-size:.94rem; }
  .account-code { font-size:.84rem; }
  .account-identifier { font-size:.78rem; line-height:1.5; letter-spacing:.035em; }
  .notif-panel { position:fixed; top:72px; right:8px; left:8px; width:auto; max-height:calc(100dvh - 88px); }
  .data-table { font-size: .8rem; }
  .data-table th, .data-table td { padding: .5rem .35rem; }
}

.admin-direct-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, #ddd);
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 7%, #fff);
}
.admin-direct-card strong { display: block; margin-bottom: 5px; color: var(--primary); }
.admin-direct-card p { margin: 0; }
.admin-direct-card form { flex: 0 0 auto; }
@media (max-width: 760px) {
  .admin-direct-card { align-items: stretch; flex-direction: column; }
  .admin-direct-card form,
  .admin-direct-card .btn { width: 100%; }
}

@media (max-width: 760px) {
  .site-header { padding:.7rem 0; }
  .header-inner { flex-wrap:wrap; gap:.65rem; }
  .brand { flex:none; gap:.55rem; font-size:1.2rem; min-width:0; }
  .brand-mark { width:34px; height:34px; }
  .brand img { max-height:34px; max-width:145px; object-fit:contain; }
  .header-actions { margin-left:auto; gap:.35rem; min-width:0; }
  .header-actions .btn { padding:.58rem .68rem; font-size:.78rem; white-space:nowrap; }
  .header-actions .language-trigger { padding:.55rem .58rem; }
  .services, .about, .contact { padding:3.5rem 0; }
  .section-head { margin-bottom:2rem; }
  .service-card { padding:1.35rem; }
}

@media (max-width: 460px) {
  .container { padding-left:.9rem; padding-right:.9rem; }
  .header-inner .brand { width:100%; justify-content:center; }
  .header-actions { width:100%; margin:0; justify-content:center; }
  .header-actions .btn { flex:1; max-width:145px; }
  .header-actions .language-selector { flex:none; }
  .hero { padding:3rem 0 4rem; }
  .hero-cta { display:grid; grid-template-columns:1fr; }
  .hero-cta .btn { width:100%; }
  .hero-trust { grid-template-columns:1fr; }
  .about-stats { grid-template-columns:1fr; }
  .auth-section { padding:2rem 0; }
  .auth-form-wrap { padding:1.25rem; }
  .app-sidebar-foot { flex-direction:column; }
}

/* ============================================
   NOTIFICATIONS — cloche topbar
   ============================================ */
.app-status { display: flex; align-items: center; gap: 1rem; }
.notif-bell { position: relative; }
.notif-trigger {
  background: transparent; border: 1px solid var(--border);
  width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; font-size: 1.1rem; position: relative;
  transition: all .2s;
}
.notif-trigger:hover { border-color: var(--accent); background: var(--bg-soft); }
.notif-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: #fff;
  border-radius: 999px; min-width: 18px; height: 18px;
  font-size: .65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.notif-panel {
  position: absolute; top: calc(100% + .5rem); right: 0;
  width: 340px; max-height: 480px; overflow-y: auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  z-index: 100; display: none;
}
.notif-panel.open { display: block; }
.notif-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem; border-bottom: 1px solid var(--border);
}
.notif-header strong { font-family: var(--font-display); font-size: 1.1rem; color: var(--primary); }
.notif-empty { padding: 2rem 1rem; text-align: center; color: var(--text-muted); font-size: .9rem; }
.notif-item {
  display: flex; gap: .75rem; padding: 1rem;
  border-bottom: 1px solid var(--border); color: var(--text);
  transition: background .2s;
}
.notif-item:hover { background: var(--bg-soft); color: var(--text); }
.notif-item.unread { background: rgba(201, 165, 90, 0.05); }
.notif-item.unread::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); display: block; flex-shrink: 0;
  margin-top: .5rem;
}
.notif-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1rem;
}
.notif-item strong { font-size: .9rem; color: var(--primary); display: block; }
.notif-item p { font-size: .85rem; color: var(--text-muted); margin: .25rem 0 0; }
.notif-item small { font-size: .75rem; color: var(--text-light); }
.notif-footer {
  display: block; padding: .85rem; text-align: center;
  background: var(--bg-soft); font-size: .85rem; color: var(--accent);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Page complète notifications */
.notif-list-full { display: grid; gap: .5rem; max-width: 800px; }
.notif-item-full {
  display: flex; gap: 1rem; padding: 1.25rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  position: relative;
}
.notif-item-full:hover { border-color: var(--accent); color: var(--text); }
.notif-item-full.unread { border-left: 3px solid var(--accent); }
.notif-dot {
  position: absolute; top: 1rem; right: 1rem;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}

/* ============================================
   Sidebar : badges sur les liens de nav
   ============================================ */
.nav-badge {
  display: inline-flex; min-width: 20px; height: 20px;
  background: var(--accent); color: var(--primary);
  border-radius: 999px; font-size: .7rem; font-weight: 700;
  align-items: center; justify-content: center;
  padding: 0 6px; margin-left: auto;
}
.nav-badge.live {
  background: var(--danger); color: #fff;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}
.app-nav a { display: flex; align-items: center; }

/* ============================================
   Inline labels (filtres date)
   ============================================ */
.inline-label {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .85rem; color: var(--text-muted); font-weight: 500;
}
.inline-label input, .inline-label select {
  padding: .5rem .75rem;
  border: 1px solid var(--border-dark); border-radius: var(--radius);
  font-family: inherit; font-size: .9rem; background: var(--bg-card);
}

/* ============================================
   Audit log
   ============================================ */
.action-tag {
  display: inline-block; padding: .15rem .55rem;
  background: var(--primary); color: var(--accent);
  font-family: 'Courier New', monospace; font-size: .75rem;
  border-radius: var(--radius); letter-spacing: .5px;
}
.language-selector{position:relative;z-index:100}.language-trigger{display:flex;align-items:center;gap:.38rem;border:1px solid var(--border);border-radius:10px;padding:.55rem .7rem;background:#fff;color:var(--primary);font:600 .78rem Inter,sans-serif;cursor:pointer}.language-menu{position:absolute;top:calc(100% + .45rem);right:0;display:none;min-width:185px;padding:.45rem;border:1px solid var(--border);border-radius:12px;background:#fff;box-shadow:0 14px 35px rgba(9,42,70,.16)}.language-selector.open .language-menu{display:grid}.language-menu a{display:flex;justify-content:space-between;align-items:center;padding:.65rem .7rem;border-radius:8px;color:var(--text);text-decoration:none;font-size:.84rem}.language-menu a:hover,.language-menu a.active{background:#f3f0e8;color:var(--primary)}.language-menu small{color:var(--text-muted)}@media(max-width:700px){.language-menu{right:auto;left:0}.language-trigger span{display:none}}
/* Application installable */
.pwa-install[hidden],.pwa-install-reminder[hidden]{display:none!important}
.pwa-install{position:fixed;z-index:10000;left:50%;bottom:max(22px,env(safe-area-inset-bottom));transform:translate(-50%,24px);width:min(920px,calc(100% - 32px));max-height:calc(100dvh - 24px);overflow:auto;display:grid;grid-template-columns:auto 1fr auto;gap:18px;align-items:center;padding:20px 22px;background:rgba(255,255,255,.98);border:1px solid rgba(10,37,64,.14);border-radius:20px;box-shadow:0 24px 70px rgba(10,37,64,.25);opacity:0;transition:.3s}
.pwa-install.visible{opacity:1;transform:translate(-50%,0)}
.pwa-install-icon{width:58px;height:58px;border-radius:17px;display:grid;place-items:center;background:linear-gradient(145deg,var(--primary),#16476f);color:var(--accent);font-weight:800;box-shadow:inset 0 0 0 1px rgba(255,255,255,.16)}
.pwa-install-icon img{display:block;width:100%;height:100%;object-fit:contain;border-radius:17px;background:#fff}
.pwa-install-copy h2{font-size:1.32rem;margin:.15rem 0 .25rem;color:var(--primary)}
.pwa-install-copy p{margin:0;color:var(--text-muted);font-size:.9rem;line-height:1.45}
.pwa-install-eyebrow{font-size:.7rem;letter-spacing:.14em;font-weight:800;color:#9b742f}
.pwa-install-actions{display:flex;flex-direction:column;gap:8px;min-width:205px}
.pwa-install-actions .btn{justify-content:center;font-size:.84rem;padding:.68rem 1rem}
.pwa-install-actions small{max-width:230px;color:var(--text-muted);line-height:1.3}
.pwa-install-close{position:absolute;right:10px;top:7px;border:0;background:transparent;font-size:1.3rem;color:#677582;cursor:pointer}
.pwa-install-reminder{position:fixed;z-index:9999;right:18px;bottom:18px;border:0;border-radius:999px;padding:.8rem 1rem;background:var(--primary);color:#fff;box-shadow:0 10px 30px rgba(10,37,64,.3);font-weight:700;cursor:pointer}
.pwa-ios-help{margin-top:5px!important;color:#8b691f!important;font-weight:600}
@media(max-width:760px){.pwa-install{grid-template-columns:auto 1fr;padding:16px;bottom:max(10px,env(safe-area-inset-bottom));gap:12px}.pwa-install-actions{grid-column:1/-1;width:100%;display:grid;grid-template-columns:1fr 1fr}.pwa-install-actions small{grid-column:1/-1}.pwa-install-icon{width:48px;height:48px}.pwa-install-copy h2{font-size:1.08rem}.pwa-install-copy p{font-size:.82rem}}
@media(max-width:460px){.pwa-install-actions{grid-template-columns:1fr}.pwa-install-actions small{grid-column:auto}.pwa-install{width:calc(100% - 14px);padding:14px;bottom:max(7px,env(safe-area-inset-bottom));border-radius:16px}.pwa-install-copy h2{font-size:1rem}.pwa-install-eyebrow{font-size:.62rem}.pwa-install-reminder{right:8px;bottom:max(8px,env(safe-area-inset-bottom))}}

/* ============================================
   NAVIGATION MOBILE V2 — menus sans débordement
   ============================================ */
.mobile-menu-toggle,.app-menu-toggle,.sidebar-scrim{display:none}
.mobile-menu-toggle,.app-menu-toggle{width:44px;height:44px;border:1px solid var(--border);border-radius:11px;background:#fff;align-items:center;justify-content:center;flex-direction:column;gap:5px;cursor:pointer;flex:none}
.mobile-menu-toggle span,.app-menu-toggle span{display:block;width:20px;height:2px;border-radius:4px;background:var(--primary);transition:.2s}
.app-main{min-width:0;width:100%}
img,video,canvas,svg{max-width:100%}

@media (max-width:900px){
  html,body{width:100%;max-width:100%;overflow-x:hidden!important}
  .app-body{display:block;min-width:0;width:100%}
  .app-sidebar{position:fixed;z-index:1200;inset:0 auto 0 0;width:min(86vw,310px);height:100dvh;padding:1.25rem;transform:translateX(-105%);transition:transform .25s ease;box-shadow:18px 0 50px rgba(0,0,0,.25);overflow-y:auto}
  .sidebar-open .app-sidebar{transform:translateX(0)}
  .app-nav{flex-direction:column;overflow:visible;flex-wrap:nowrap;padding:0}
  .app-nav a{padding:.8rem .9rem;font-size:.88rem;flex:none}
  .app-sidebar-foot{display:block;padding-top:1rem}
  .app-sidebar-foot .btn{width:100%}
  .sidebar-scrim{position:fixed;z-index:1190;inset:0;width:100%;height:100%;border:0;background:rgba(3,17,29,.56);cursor:pointer}
  .sidebar-open .sidebar-scrim{display:block}
  .sidebar-open{overflow:hidden}
  .app-menu-toggle{display:flex}
  .app-main,.app-topbar,.app-content{min-width:0;width:100%;max-width:100%}
  .app-topbar{position:sticky;top:0;left:0;right:0;z-index:900;padding:.8rem 1rem;min-height:68px;overflow:visible}
  .app-user-summary{flex:1;min-width:0}
  .app-user-summary strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .app-content{width:100%;max-width:100%;padding:1rem;overflow:hidden;margin:0}
  .app-flash{margin:1rem}
  .info-card{width:100%;max-width:100%}
  .data-table{display:block;width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;white-space:nowrap}
  .data-table tbody,.data-table thead{display:table;width:100%;min-width:680px}
  .support-admin-grid{grid-template-columns:1fr;min-width:0}
  .support-thread-list,.support-shell{max-width:100%;min-width:0}
}

@media (max-width:700px){
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
  .stat-card{padding:1rem}
  .stat-value{font-size:1.65rem;overflow-wrap:anywhere}
  .section-head-small{gap:.75rem;align-items:flex-start}
  .section-head-small h3{font-size:1.18rem}
  .section-head-small a{white-space:nowrap;font-size:.82rem}
  .grid-form,.form-row,.payment-grid{grid-template-columns:minmax(0,1fr)!important}
  input,select,textarea,.btn{max-width:100%}
}

@media (max-width:760px){
  .site-header{padding:.65rem 0;width:100%;max-width:100vw}
  .site-header .header-inner{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.65rem;width:100%;padding:0 1rem}
  .site-header .brand{width:auto;min-width:0;justify-content:flex-start;font-size:1.18rem}
  .site-header .brand-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mobile-menu-toggle{display:flex}
  .site-header.mobile-open .mobile-menu-toggle span:nth-child(1){transform:translateY(7px) rotate(45deg)}
  .site-header.mobile-open .mobile-menu-toggle span:nth-child(2){opacity:0}
  .site-header.mobile-open .mobile-menu-toggle span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
  .site-nav,.header-actions{display:none!important}
  .site-header.mobile-open .site-nav{grid-column:1/-1;display:grid!important;gap:0;padding:.45rem;border:1px solid var(--border);border-radius:12px;background:#fff;box-shadow:var(--shadow)}
  .site-header.mobile-open .site-nav a{padding:.75rem .8rem;border-radius:8px}
  .site-header.mobile-open .header-actions{grid-column:1/-1;display:grid!important;grid-template-columns:auto 1fr 1fr;gap:.5rem;width:100%;margin:0;padding:.1rem 0 .35rem}
  .site-header.mobile-open .header-actions .btn{max-width:none;width:100%;min-width:0;white-space:normal;line-height:1.2;padding:.7rem .5rem}
  .site-header.mobile-open .language-selector{width:auto}
  .site-header.mobile-open .language-trigger{height:100%}
  .site-main,.site-footer{width:100%;max-width:100vw;overflow:hidden}
  .footer-inner{grid-template-columns:1fr!important;gap:1.4rem;padding:2.5rem 1rem 2rem}
  .footer-col{min-width:0}
  .footer-col p,.footer-col a{overflow-wrap:anywhere}
  .footer-bottom{padding:1rem}
  .hero-inner,.about-inner,.contact-inner,.auth-grid{gap:2rem}
  .services-grid{grid-template-columns:minmax(0,1fr)}
  .service-card{width:100%;min-width:0}
  .support-messages{height:min(52dvh,420px);padding:1rem}
  .support-message{max-width:92%}
  .transfer-progress{padding:1.35rem 1rem}
  .progress-head{margin-bottom:1.5rem}
  .bankcard{width:100%;padding:1.15rem}
  .bankcard-number{font-size:clamp(.9rem,4.2vw,1.2rem);letter-spacing:1px}
}

@media (max-width:480px){
  .app-topbar{gap:.5rem;padding:.7rem .75rem}
  .app-menu-toggle{width:40px;height:40px}
  .app-status{gap:.35rem;flex-wrap:nowrap}
  .app-status .badge{display:none}
  .notif-trigger{width:38px;height:38px}
  .language-trigger{padding:.5rem .55rem}
  .info-card,.alert-card,.transfer-form,.order-card-block{padding:1rem}
  .balance-card{padding:1.1rem}
  .pwa-install{grid-template-columns:42px minmax(0,1fr);gap:9px;width:calc(100% - 12px);max-height:calc(100dvh - 12px);padding:12px}
  .pwa-install-icon{width:42px;height:42px;border-radius:12px}
  .pwa-install-copy h2{font-size:.96rem}
  .pwa-install-copy p{font-size:.76rem;line-height:1.35}
  .pwa-install-actions .btn{min-height:43px}
  .stats-grid{grid-template-columns:minmax(0,1fr)}
  .page-title{font-size:1.55rem;line-height:1.15}
  .app-content{padding:.75rem}
  .info-card{border-radius:14px}
}

/* Mode application installée : parcours public réduit à l’essentiel. */
@media (display-mode: standalone) {
  body[data-pwa-surface="public"] .site-nav,
  body[data-pwa-surface="public"] .header-actions,
  body[data-pwa-surface="public"] .mobile-menu-toggle,
  body[data-pwa-surface="public"] .site-footer,
  body[data-pwa-surface="public"] .pwa-install,
  body[data-pwa-surface="public"] .pwa-install-reminder {
    display: none !important;
  }
  body[data-pwa-surface="public"] .site-header .header-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
  }
  body[data-pwa-surface="public"] .header-language {
    display: block !important;
    justify-self: end;
  }
}

.pwa-standalone body[data-pwa-surface="public"] .site-nav,
.pwa-standalone body[data-pwa-surface="public"] .header-actions,
.pwa-standalone body[data-pwa-surface="public"] .mobile-menu-toggle,
.pwa-standalone body[data-pwa-surface="public"] .site-footer,
.pwa-standalone body[data-pwa-surface="public"] .pwa-install,
.pwa-standalone body[data-pwa-surface="public"] .pwa-install-reminder {
  display: none !important;
}
.pwa-standalone body[data-pwa-surface="public"] .site-header .header-inner {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
}
.pwa-standalone body[data-pwa-surface="public"] .header-language {
  display: block !important;
  justify-self: end;
}

/* Sélecteur de langue avec drapeaux, indépendant du menu principal */
.header-language{display:flex;align-items:center;flex:none}
.language-trigger .language-flag{display:block;width:24px;height:16px;object-fit:cover;border-radius:3px;box-shadow:0 0 0 1px rgba(10,37,64,.14)}
.language-trigger .language-chevron{display:inline-block;font-size:.8rem}
.language-menu a>span:first-child{display:flex;align-items:center;gap:.6rem}
.language-menu .language-flag{display:block;width:25px;height:17px;object-fit:cover;border-radius:3px;box-shadow:0 0 0 1px rgba(10,37,64,.14)}
@media(max-width:700px){
  .language-trigger .language-code{display:none}
  .language-trigger .language-flag,.language-trigger .language-chevron{display:inline-block}
  .header-language .language-menu{right:0;left:auto}
  .app-topbar{overflow:visible}
  .app-status .language-selector{position:relative;min-width:0;z-index:1100}
  .app-status .language-menu{
    right:0;left:auto;
    width:210px;min-width:0;max-width:calc(100vw - 20px);
    overflow:hidden;
  }
  .app-status .language-menu a{min-width:0;gap:.5rem;white-space:nowrap}
  .app-status .language-menu a>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis}
  .app-status .language-menu small{flex:none}
}
@media(max-width:760px){
  .site-header .header-inner{grid-template-columns:minmax(0,1fr) auto auto}
  .site-header .header-language{grid-column:2;grid-row:1}
  .site-header .mobile-menu-toggle{grid-column:3;grid-row:1}
  .site-header.mobile-open .site-nav{grid-column:1/-1}
  .site-header.mobile-open .header-actions{grid-column:1/-1;grid-template-columns:1fr 1fr}
  .hero-trust{grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem .75rem}
  .hero-trust div{min-width:0}
  .services-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
  .service-card{padding:1rem;min-height:100%}
  .service-card h3{font-size:clamp(1.08rem,5.2vw,1.35rem);line-height:1.08;overflow-wrap:anywhere}
  .service-card p{font-size:.84rem;line-height:1.5;overflow-wrap:anywhere}
  .service-icon{width:48px;height:48px;margin-bottom:1.1rem}
}

/* Interactions de type application native */
.app-control-pressed{transform:scale(.97)!important;filter:brightness(.96);transition:transform .08s ease,filter .08s ease!important}
.app-action-overlay[hidden]{display:none!important}
.app-action-overlay{position:fixed;inset:0;z-index:30000;display:grid;place-items:center;padding:20px;background:rgba(4,22,36,.38);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);opacity:0;transition:opacity .16s ease;touch-action:none;cursor:wait}
.app-action-overlay.visible{opacity:1}
.app-action-card{width:min(330px,calc(100vw - 36px));display:grid;justify-items:center;gap:10px;padding:27px 24px 23px;background:rgba(255,255,255,.98);border:1px solid rgba(255,255,255,.7);border-radius:20px;box-shadow:0 24px 70px rgba(4,22,36,.3);text-align:center}
.app-action-spinner{width:48px;height:48px;border-radius:50%;border:4px solid rgba(10,37,64,.12);border-top-color:var(--primary);border-right-color:var(--accent);animation:app-spin .72s linear infinite}
.app-action-title{font-family:var(--font-display,Georgia,serif);font-size:1.35rem;line-height:1.1;color:var(--primary)}
.app-action-text{font:500 .88rem/1.45 var(--font-body,Inter,sans-serif);color:var(--text-muted,#667085)}
.app-action-progress{width:100%;height:3px;margin-top:5px;overflow:hidden;border-radius:99px;background:rgba(10,37,64,.09)}
.app-action-progress i{display:block;width:42%;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--accent),var(--primary));animation:app-progress 1.05s ease-in-out infinite}
.app-action-busy{overflow:hidden!important;cursor:wait}
.app-action-busy .app-action-overlay{pointer-events:all}
@keyframes app-spin{to{transform:rotate(360deg)}}
@keyframes app-progress{0%{transform:translateX(-115%)}100%{transform:translateX(340%)}}

.app-toast-region{position:fixed;z-index:31000;top:max(18px,env(safe-area-inset-top));right:18px;width:min(390px,calc(100vw - 24px));display:grid;gap:10px;pointer-events:none}
.app-toast{display:grid;grid-template-columns:44px minmax(0,1fr) 30px;gap:12px;align-items:start;padding:15px;background:#fff;border:1px solid rgba(10,37,64,.12);border-left:4px solid var(--accent);border-radius:15px;box-shadow:0 18px 50px rgba(4,22,36,.22);opacity:0;transform:translateY(-16px) scale(.97);transition:opacity .24s ease,transform .24s ease;pointer-events:auto}
.app-toast.visible{opacity:1;transform:none}
.app-toast.clickable{cursor:pointer}
.app-toast-icon{width:44px;height:44px;display:grid;place-items:center;border-radius:13px;background:var(--primary);color:#fff;font-size:1.15rem;font-weight:700}
.app-toast-copy{min-width:0;padding-top:1px}
.app-toast-copy strong{display:block;color:var(--primary);font:700 .94rem/1.3 var(--font-body,Inter,sans-serif)}
.app-toast-copy p{margin:4px 0 0;color:var(--text-muted,#667085);font:400 .82rem/1.45 var(--font-body,Inter,sans-serif);overflow-wrap:anywhere}
.app-toast-close{width:30px;height:30px;padding:0;border:0;border-radius:9px;background:transparent;color:#667085;font-size:1.35rem;line-height:1;cursor:pointer}
.app-toast-close:hover{background:#f2f4f7;color:var(--primary)}
@media(max-width:600px){.app-toast-region{top:max(10px,env(safe-area-inset-top));right:12px}.app-toast{grid-template-columns:38px minmax(0,1fr) 28px;padding:12px;gap:10px}.app-toast-icon{width:38px;height:38px;border-radius:11px}.app-action-card{padding:24px 20px}}
@media(prefers-reduced-motion:reduce){.app-control-pressed{transform:none!important}.app-action-spinner,.app-action-progress i{animation-duration:1.8s}.app-action-overlay,.app-toast{transition:none}}

.push-enable-prompt{position:fixed;z-index:1650;right:18px;bottom:max(18px,env(safe-area-inset-bottom));width:min(390px,calc(100vw - 24px));display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:13px;padding:14px 16px;border:1px solid rgba(212,164,55,.45);border-radius:17px;background:#fff;color:var(--primary);box-shadow:0 18px 55px rgba(4,22,36,.24);text-align:left;opacity:0;transform:translateY(18px);transition:opacity .24s ease,transform .24s ease;cursor:pointer}
.push-enable-prompt.visible{opacity:1;transform:none}
.push-enable-prompt:hover{border-color:var(--accent);transform:translateY(-2px)}
.push-enable-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;background:var(--primary);font-size:1.35rem}
.push-enable-prompt strong{display:block;font:700 .94rem/1.3 var(--font-body,Inter,sans-serif)}
.push-enable-prompt small{display:block;margin-top:3px;color:var(--text-muted,#667085);font:400 .78rem/1.4 var(--font-body,Inter,sans-serif)}
@media(max-width:600px){.push-enable-prompt{right:12px;bottom:max(12px,env(safe-area-inset-bottom));grid-template-columns:42px minmax(0,1fr);padding:12px}.push-enable-icon{width:42px;height:42px}}

/* Notifications : priorité mobile et lisibilité dans la PWA. */
.notif-panel {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.notif-item { align-items: flex-start; }
.notif-item > div,
.notif-item-full > div { min-width: 0; text-align: left; }
.notif-item strong,
.notif-item p,
.notif-item-full strong,
.notif-item-full p { overflow-wrap: anywhere; word-break: normal; }
.notif-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, white);
}

@media (max-width: 600px) {
  body.notification-panel-open { overflow: hidden !important; }
  .notif-bell { position: static; }
  .notif-bell.panel-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1690;
    background: rgba(2, 21, 38, .42);
    backdrop-filter: blur(2px);
  }
  .notif-panel,
  .notif-panel.open {
    position: fixed !important;
    z-index: 1700 !important;
    top: calc(max(68px, env(safe-area-inset-top) + 58px)) !important;
    right: 8px !important;
    left: 8px !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - max(84px, env(safe-area-inset-top) + 74px)) !important;
    margin: 0 !important;
    border-radius: 16px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-shadow: 0 18px 55px rgba(2, 21, 38, .3) !important;
  }
  .notif-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
  }
  .notif-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: block;
    background: #fff;
  }
  .notif-item {
    width: 100%;
    padding: 14px 16px;
    gap: 12px;
  }
  .notif-item strong,
  .notif-item p { max-width: 100%; white-space: normal; }
}
