/* TI Conseil — charte : bleu nuit (confiance), or (prestige), blanc, Playfair Display + Inter. */
:root {
  --ti-navy: #0b1f3a;
  --ti-navy-2: #132c50;
  --ti-gold: #c9a45c;
  --ti-gold-dark: #a8853f;
  --ti-ink: #1d2433;
  --ti-muted: #5b6474;
  --ti-line: #e6e8ee;
  --ti-soft: #f6f4ef;
  --bs-primary: #0b1f3a;
  --bs-primary-rgb: 11, 31, 58;
  --bs-link-color: #0b1f3a;
  --bs-link-hover-color: #a8853f;
  --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-color: #1d2433;
}

body { background: #fff; color: var(--ti-ink); font-family: var(--bs-body-font-family); }
h1, h2, h3, h4, .font-serif { font-family: 'Playfair Display', Georgia, serif; color: var(--ti-navy); }
a { text-underline-offset: 3px; }
.text-gold { color: var(--ti-gold-dark) !important; }
.text-muted-ti { color: var(--ti-muted) !important; }
.bg-navy { background: var(--ti-navy) !important; color: #fff; }
.bg-soft { background: var(--ti-soft) !important; }
.border-gold { border-color: var(--ti-gold) !important; }

.btn-primary { --bs-btn-bg: var(--ti-navy); --bs-btn-border-color: var(--ti-navy); --bs-btn-hover-bg: var(--ti-navy-2); --bs-btn-hover-border-color: var(--ti-navy-2); --bs-btn-active-bg: var(--ti-navy-2); }
.btn-gold { --bs-btn-color: var(--ti-navy); --bs-btn-bg: var(--ti-gold); --bs-btn-border-color: var(--ti-gold); --bs-btn-hover-color: var(--ti-navy); --bs-btn-hover-bg: #d6b679; --bs-btn-hover-border-color: #d6b679; --bs-btn-active-bg: var(--ti-gold-dark); font-weight: 600; }
.btn-outline-primary { --bs-btn-color: var(--ti-navy); --bs-btn-border-color: var(--ti-navy); --bs-btn-hover-bg: var(--ti-navy); --bs-btn-hover-border-color: var(--ti-navy); }
.btn-outline-light:hover { color: var(--ti-navy); }

/* ---------- En-tete ---------- */
.ti-topbar { background: var(--ti-navy); color: rgba(255, 255, 255, 0.82); font-size: 0.85rem; }
.ti-topbar a { color: #fff; text-decoration: none; }
.ti-navbar { background: #fff; border-bottom: 1px solid var(--ti-line); }
.ti-navbar .navbar-brand img { height: 74px; width: auto; }
.ti-navbar .nav-link { color: var(--ti-ink); font-weight: 500; padding: 0.5rem 0.85rem !important; }
.ti-navbar .nav-link.active, .ti-navbar .nav-link:hover { color: var(--ti-gold-dark); }

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.kicker { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.75rem; font-weight: 600; color: var(--ti-gold-dark); }
.kicker::before { content: ''; display: inline-block; width: 26px; height: 2px; background: var(--ti-gold); vertical-align: middle; margin-right: 10px; }
.lead-muted { color: var(--ti-muted); font-size: 1.1rem; }
.diamond { display: inline-block; width: 8px; height: 8px; background: var(--ti-gold); transform: rotate(45deg); margin: 0 10px; vertical-align: middle; }

.ti-hero { position: relative; color: #fff; background: linear-gradient(110deg, rgba(11, 31, 58, 0.96) 0%, rgba(11, 31, 58, 0.86) 48%, rgba(11, 31, 58, 0.35) 100%), url('/img/hero-meeting.jpg') center / cover no-repeat; padding: 7rem 0 6rem; }
.ti-hero h1 { color: #fff; font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.15; }
.ti-hero .lead { color: rgba(255, 255, 255, 0.85); max-width: 640px; }
.ti-hero .badge-aud { border: 1px solid rgba(201, 164, 92, 0.6); color: #f1e3c4; font-weight: 500; padding: 0.45rem 0.8rem; border-radius: 999px; font-size: 0.85rem; }

.page-hero { background: var(--ti-navy); color: #fff; padding: 4rem 0 3rem; position: relative; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border: 2px solid rgba(201, 164, 92, 0.25); border-radius: 50%; }
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255, 255, 255, 0.8); max-width: 720px; }
.page-hero .breadcrumb a { color: var(--ti-gold); }
.page-hero .breadcrumb-item.active, .page-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, 0.6); }

/* ---------- Cartes ---------- */
.ti-card { border: 1px solid var(--ti-line); border-radius: 14px; background: #fff; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
/* Hauteur egale seulement pour une carte seule dans sa colonne de grille : deux
   cartes empilees dans la meme colonne garderaient sinon chacune 100 % et
   deborderaient sur la suite de la page (pied de page). */
.row > [class*='col'] > .ti-card:only-child { height: 100%; }
a.ti-card:hover, .price-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(11, 31, 58, 0.09); border-color: rgba(201, 164, 92, 0.6); }
.ti-icon { width: 54px; height: 54px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(201, 164, 92, 0.14); color: var(--ti-gold-dark); font-size: 1.5rem; }
.step-num { font-family: 'Playfair Display', serif; font-size: 2.6rem; color: var(--ti-gold); line-height: 1; }

.mission { border-left: 3px solid var(--ti-gold); background: #fff; border-radius: 0 12px 12px 0; padding: 1.1rem 1.25rem; height: 100%; box-shadow: 0 2px 10px rgba(11, 31, 58, 0.05); }
/* La situation du client introduit, la mission du cabinet est l'information principale. */
.mission .situation { font-family: 'Playfair Display', serif; font-style: italic; color: var(--ti-muted); font-size: 0.92rem; }
.mission .answer { color: var(--ti-navy); font-weight: 600; font-size: 1.05rem; line-height: 1.45; margin: 0.35rem 0 0; }

.nav-ti-tabs { gap: 0.5rem; border: 0; }
.nav-ti-tabs .nav-link { border: 1px solid var(--ti-line); border-radius: 999px; color: var(--ti-ink); background: #fff; font-weight: 500; }
.nav-ti-tabs .nav-link.active { background: var(--ti-navy); border-color: var(--ti-navy); color: #fff; }

.price-card.featured { border: 2px solid var(--ti-gold); box-shadow: 0 16px 40px rgba(11, 31, 58, 0.1); }
.price-card .price { font-family: 'Playfair Display', serif; font-size: 2.2rem; color: var(--ti-navy); }
.check-list { list-style: none; padding: 0; }
.check-list li { padding: 0.3rem 0 0.3rem 1.7rem; position: relative; }
.check-list li::before { content: '\F26E'; font-family: 'bootstrap-icons'; position: absolute; left: 0; color: var(--ti-gold-dark); }

.stars { color: var(--ti-gold); letter-spacing: 2px; }
.quote-card blockquote { font-size: 1.02rem; color: var(--ti-ink); }
.quote-card .avatar { flex: 0 0 44px; width: 44px; height: 44px; aspect-ratio: 1; border-radius: 50%; background: var(--ti-navy); color: var(--ti-gold); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }

.accordion-button:not(.collapsed) { background: var(--ti-soft); color: var(--ti-navy); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 0.2rem rgba(201, 164, 92, 0.35); }
.accordion-item { border-color: var(--ti-line); }

.cta-band { background: linear-gradient(120deg, var(--ti-navy), var(--ti-navy-2)); color: #fff; border-radius: 18px; padding: 3rem; }
.cta-band h2 { color: #fff; }

.article-card img { aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px 14px 0 0; }
.article-body { font-size: 1.07rem; line-height: 1.8; }
.article-body h2 { margin-top: 2rem; font-size: 1.6rem; }
.article-body h3 { margin-top: 1.6rem; font-size: 1.3rem; }
.article-body blockquote { border-left: 3px solid var(--ti-gold); padding-left: 1rem; color: var(--ti-muted); font-style: italic; }
.article-body img { max-width: 100%; height: auto; border-radius: 10px; }

.slot-btn { min-width: 84px; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--ti-gold); box-shadow: 0 0 0 0.2rem rgba(201, 164, 92, 0.25); }
.form-check-input:checked { background-color: var(--ti-navy); border-color: var(--ti-navy); }
/* Formulaires du site public et de connexion : intitules en gras (l admin et l espace client gardent le style par defaut). */
body:not(.app-shell) .form-label { font-weight: 600; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.result-box { background: var(--ti-soft); border-radius: 14px; padding: 1.5rem; border: 1px solid #ece4d3; }
.result-figure { font-family: 'Playfair Display', serif; font-size: 2.4rem; color: var(--ti-navy); }

/* ---------- Pied de page ---------- */
.ti-footer { background: var(--ti-navy); color: rgba(255, 255, 255, 0.75); padding: 4rem 0 1.5rem; }
.ti-footer h6 { color: var(--ti-gold); text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.78rem; font-family: 'Inter', sans-serif; }
.ti-footer a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.ti-footer a:hover { color: var(--ti-gold); }
.ti-footer .form-control { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.ti-footer .form-control::placeholder { color: rgba(255, 255, 255, 0.5); }

/* ---------- Espaces connectes (client, admin) ---------- */
.app-shell { min-height: 100vh; background: #f5f6f9; }
.app-sidebar { width: 250px; background: var(--ti-navy); color: rgba(255, 255, 255, 0.8); position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; z-index: 1030; transition: transform 0.2s; }
.app-sidebar .brand { padding: 1.2rem 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.app-sidebar .brand img { height: 64px; }
.app-sidebar .nav-section { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.68rem; color: rgba(255, 255, 255, 0.45); padding: 1rem 1.25rem 0.4rem; }
.app-sidebar .nav-link { color: rgba(255, 255, 255, 0.8); padding: 0.55rem 1.25rem; display: flex; align-items: center; gap: 0.7rem; border-left: 3px solid transparent; }
.app-sidebar .nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.app-sidebar .nav-link.active { color: #fff; background: rgba(201, 164, 92, 0.14); border-left-color: var(--ti-gold); }
.app-sidebar .nav-link .badge { margin-left: auto; }
.app-main { margin-left: 250px; }
.app-topbar { background: #fff; border-bottom: 1px solid var(--ti-line); padding: 0.75rem 1.5rem; position: sticky; top: 0; z-index: 1020; }
.app-content { padding: 1.75rem 1.5rem 3rem; }
.app-card { background: #fff; border: 1px solid var(--ti-line); border-radius: 12px; }
.app-card .card-header { background: transparent; border-bottom: 1px solid var(--ti-line); font-weight: 600; }
.kpi { padding: 1.2rem 1.25rem; }
.kpi .value { font-size: 1.9rem; font-weight: 700; color: var(--ti-navy); line-height: 1.1; }
.kpi .label { color: var(--ti-muted); font-size: 0.85rem; }
.kpi .ico { width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(201, 164, 92, 0.15); color: var(--ti-gold-dark); font-size: 1.2rem; }
.greeting-banner { background: linear-gradient(120deg, var(--ti-navy), #1d3d68); color: #fff; border-radius: 14px; padding: 1.6rem 1.75rem; }
.greeting-banner h1 { color: #fff; font-size: 1.7rem; }
.table > :not(caption) > * > * { padding: 0.7rem 0.75rem; }
.table thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ti-muted); font-weight: 600; background: #fafbfc; }
.thread .msg { max-width: 82%; border-radius: 12px; padding: 0.8rem 1rem; margin-bottom: 0.8rem; white-space: pre-wrap; }
.thread .msg.mine { margin-left: auto; background: var(--ti-navy); color: #fff; }
.thread .msg.theirs { background: #fff; border: 1px solid var(--ti-line); }
.thread .meta { font-size: 0.75rem; opacity: 0.7; margin-top: 0.3rem; }
.pipeline-col { min-width: 260px; }
.pipeline-card { cursor: grab; }
.auth-wrap { min-height: 100vh; background: linear-gradient(120deg, var(--ti-navy) 0%, #1d3d68 100%); display: flex; align-items: center; padding: 2rem 1rem; }
.auth-card { max-width: 440px; width: 100%; margin: 0 auto; background: #fff; border-radius: 16px; padding: 2.2rem; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); }
#editor { min-height: 380px; background: #fff; font-size: 1.02rem; }
.ql-toolbar.ql-snow, .ql-container.ql-snow { border-color: var(--ti-line); }

@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.open { transform: none; }
  .app-main { margin-left: 0; }
  .section { padding: 3.5rem 0; }
  .ti-hero { padding: 5rem 0 4rem; }
  .cta-band { padding: 2rem 1.5rem; }
}

@media print {
  .no-print, .ti-topbar, .ti-navbar, .ti-footer { display: none !important; }
}
