/* =====================================================================
   Lieu-D'Hibiscus — styles socle (Lot 0)
   Palette : fond clair, accents hibiscus (orange/jaune) + feuillage (teal).
   Bootstrap 5 sera intégré en local au Lot 1 (vitrine). Servi en 'self'
   pour respecter la CSP stricte (aucun CDN).
   ===================================================================== */

:root {
  --ldh-bg: #fbf7f2;
  --ldh-surface: #ffffff;
  --ldh-text: #2c2a28;
  --ldh-muted: #6f6862;
  --ldh-border: #e7ded4;
  --ldh-hibiscus: #e2641e;     /* orange hibiscus */
  --ldh-hibiscus-dark: #c44f12;
  --ldh-soleil: #f4b740;       /* jaune */
  --ldh-feuillage: #2f8f83;    /* teal feuillage */
  --ldh-danger: #b3261e;
  --ldh-ok: #2f7d52;
  --ldh-radius: 14px;
  --ldh-shadow: 0 10px 30px rgba(60, 40, 20, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--ldh-text);
  background: var(--ldh-bg);
  line-height: 1.55;
}

a { color: var(--ldh-feuillage); text-decoration: none; }
a:hover { text-decoration: none; color: var(--ldh-hibiscus-dark); }
/* Aucun soulignement nulle part (y compris liens Bootstrap) */
a, a:hover, a:focus, .ldh-site a, .ldh-site a:hover { text-decoration: none; }
/* Liens stylés en bouton : jamais de soulignement, aspect bouton net */
.btn, a.btn, .ldh-btn, .ldh-btn-primary, .ldh-btn-outline { text-decoration: none !important; }

.ldh-shell { display: flex; min-height: 100vh; }

/* --- Barre latérale admin --- */
.ldh-side {
  width: 248px;
  background: var(--ldh-surface);
  border-right: 1px solid var(--ldh-border);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.ldh-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ldh-hibiscus-dark);
  padding: .25rem .5rem 1rem;
  display: flex; align-items: center; gap: .5rem;
}
.ldh-brand img { object-fit: contain; }
.ldh-logo { object-fit: contain; }
.ldh-nav a {
  display: block;
  padding: .55rem .65rem;
  border-radius: 10px;
  color: var(--ldh-text);
}
.ldh-nav a:hover { background: #f5ece1; text-decoration: none; }
.ldh-nav a.is-active { background: #fbe7d3; color: var(--ldh-hibiscus-dark); font-weight: 600; }
.ldh-side form { margin-top: auto; }

/* --- Zone principale --- */
.ldh-main { flex: 1; padding: 1.5rem clamp(1rem, 4vw, 2.5rem); }
.ldh-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.ldh-topbar h1 { font-size: 1.4rem; margin: 0; }

/* --- Carte centrée (login, 2FA) --- */
.ldh-center { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.ldh-card {
  background: var(--ldh-surface);
  border: 1px solid var(--ldh-border);
  border-radius: var(--ldh-radius);
  box-shadow: var(--ldh-shadow);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
}
.ldh-card h1 { margin-top: 0; font-size: 1.35rem; color: var(--ldh-hibiscus-dark); }
.ldh-card .ldh-sub { color: var(--ldh-muted); margin-top: -.25rem; }

.ldh-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
/* min-width:0 : autorise les colonnes à rétrécir pour qu'un tableau large ne
   déborde pas sur la colonne voisine (piège classique de CSS Grid). */
.ldh-grid > * { min-width: 0; }
.ldh-grid .ldh-table { display: block; overflow-x: auto; }
.ldh-panel {
  background: var(--ldh-surface);
  border: 1px solid var(--ldh-border);
  border-radius: var(--ldh-radius);
  padding: 1.25rem;
}
.ldh-panel h2 { margin: 0 0 .5rem; font-size: 1.05rem; }
.ldh-panel p { margin: .25rem 0; color: var(--ldh-muted); }

/* --- Formulaires --- */
.ldh-field { margin-bottom: 1rem; }
.ldh-field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .92rem; }
.ldh-field input[type="text"],
.ldh-field input[type="email"],
.ldh-field input[type="password"],
.ldh-field input[type="number"] {
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid var(--ldh-border);
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
}
.ldh-field input:focus {
  outline: 2px solid var(--ldh-soleil);
  border-color: var(--ldh-soleil);
}

.ldh-btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  padding: .65rem 1.1rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--ldh-hibiscus);
  color: #fff;
}
.ldh-btn:hover { background: var(--ldh-hibiscus-dark); }
.ldh-btn--ghost { background: transparent; color: var(--ldh-text); border: 1px solid var(--ldh-border); }
.ldh-btn--ghost:hover { background: #f5ece1; }
.ldh-btn--danger { background: var(--ldh-danger); }
.ldh-btn--block { width: 100%; }

/* --- Alertes --- */
.ldh-alert { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .95rem; }
.ldh-alert--error { background: #fbe3e1; color: var(--ldh-danger); }
.ldh-alert--info { background: #e3f1ea; color: var(--ldh-ok); }

.ldh-code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  background: #f3ece3;
  padding: .5rem .65rem;
  border-radius: 8px;
  display: inline-block;
  letter-spacing: .04em;
  word-break: break-all;
}
.ldh-badge { font-size: .8rem; padding: .15rem .55rem; border-radius: 999px; }
.ldh-badge--on { background: #e3f1ea; color: var(--ldh-ok); }
.ldh-badge--off { background: #f6e9d6; color: var(--ldh-hibiscus-dark); }

/* --- Vitrine publique (placeholder Lot 0) --- */
.ldh-hero { text-align: center; padding: clamp(3rem, 10vw, 7rem) 1.5rem; }
.ldh-hero h1 { font-size: clamp(2rem, 5vw, 3rem); color: var(--ldh-hibiscus-dark); margin-bottom: .5rem; }
.ldh-hero p { color: var(--ldh-muted); max-width: 40ch; margin: 0 auto 1.5rem; }
.ldh-footer { text-align: center; padding: 2rem; color: var(--ldh-muted); font-size: .9rem; }

@media (max-width: 720px) {
  .ldh-shell { flex-direction: column; }
  .ldh-side { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .ldh-side form { margin-top: 0; margin-left: auto; }
}

/* --- Tables admin --- */
.ldh-table { width: 100%; border-collapse: collapse; }
.ldh-table th, .ldh-table td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--ldh-border); vertical-align: top; }
.ldh-table th { font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ldh-muted); }
.ldh-table tbody tr:hover { background: #faf4ec; }
.ldh-row-inactif { opacity: .6; }

/* --- Avatar initiales --- */
.ldh-avatar {
  display: inline-grid; place-items: center;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: #fbe7d3; color: var(--ldh-hibiscus-dark);
  font-size: .85rem; font-weight: 700; margin-right: .4rem; vertical-align: middle;
}

/* --- Onglets fiche --- */
.ldh-tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--ldh-border); margin-bottom: 1.25rem; }
.ldh-tab { padding: .55rem .9rem; border-radius: 10px 10px 0 0; color: var(--ldh-text); border-bottom: 2px solid transparent; }
.ldh-tab:hover { background: #f5ece1; text-decoration: none; }
.ldh-tab.is-active { color: var(--ldh-hibiscus-dark); border-bottom-color: var(--ldh-hibiscus); font-weight: 600; }

/* --- Grille de formulaire --- */
.ldh-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .ldh-form-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   Vitrine (Lot 1) — thème hibiscus appliqué par-dessus Bootstrap 5.
   ===================================================================== */
.ldh-site { background: var(--ldh-bg); color: var(--ldh-text); }
.ldh-site a { color: var(--ldh-feuillage); }
.ldh-site a:hover { color: var(--ldh-hibiscus-dark); }

.ldh-navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--ldh-border);
}
.ldh-navbar .navbar-brand { color: var(--ldh-hibiscus-dark); }
.ldh-navbar .nav-link { color: var(--ldh-text); }
.ldh-navbar .nav-link:hover,
.ldh-navbar .nav-link.active { color: var(--ldh-hibiscus-dark); }

.ldh-btn-primary {
  background: var(--ldh-hibiscus);
  border: 1px solid var(--ldh-hibiscus);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(226, 100, 30, 0.28);
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}
.ldh-btn-primary:hover,
.ldh-btn-primary:focus {
  background: var(--ldh-hibiscus-dark);
  border-color: var(--ldh-hibiscus-dark);
  color: #fff;
  box-shadow: 0 9px 22px rgba(196, 79, 18, 0.34);
}
.ldh-btn-primary:active { transform: translateY(1px); }
.ldh-btn-outline {
  border: 1px solid var(--ldh-hibiscus);
  color: var(--ldh-hibiscus-dark);
  background: transparent;
}
.ldh-btn-outline:hover { background: #fbe7d3; color: var(--ldh-hibiscus-dark); }

/* Héros */
.ldh-hero-site {
  background:
    radial-gradient(1200px 400px at 80% -10%, #fdeccf 0%, rgba(253,236,207,0) 60%),
    radial-gradient(900px 380px at 0% 0%, #e4f1ee 0%, rgba(228,241,238,0) 55%),
    var(--ldh-bg);
  padding: clamp(3rem, 8vw, 6rem) 0;
}
.ldh-hero-site h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  color: #3a2d23;
  line-height: 1.15;
}
.ldh-hero-site .ldh-lede { font-size: 1.15rem; color: var(--ldh-muted); max-width: 46ch; }
.ldh-hero-emoji { font-size: clamp(6rem, 18vw, 12rem); line-height: 1; filter: drop-shadow(0 12px 24px rgba(200,90,30,.18)); }
.ldh-hero-logo { max-width: min(360px, 80%); height: auto; filter: drop-shadow(0 14px 28px rgba(200,90,30,.15)); }

/* Orbe « respirant » (aperçu du module VR) */
.ldh-vr-orb { display: grid; place-items: center; min-height: 240px; }
.ldh-vr-orb span {
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff7e0, var(--ldh-soleil) 55%, var(--ldh-hibiscus) 105%);
  box-shadow: 0 0 60px rgba(244, 183, 64, 0.5);
  animation: ldh-breathe 8s ease-in-out infinite;
}
@keyframes ldh-breathe {
  0%, 100% { transform: scale(0.78); box-shadow: 0 0 36px rgba(244,183,64,.35); }
  45%, 60% { transform: scale(1.06); box-shadow: 0 0 70px rgba(244,183,64,.55); }
}
@media (prefers-reduced-motion: reduce) { .ldh-vr-orb span { animation: none; } }

/* Sections & cartes */
.ldh-section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.ldh-section--soft { background: #fff; border-block: 1px solid var(--ldh-border); }
.ldh-eyebrow { color: var(--ldh-hibiscus-dark); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .82rem; }

.ldh-feature {
  background: var(--ldh-surface);
  border: 1px solid var(--ldh-border);
  border-radius: var(--ldh-radius);
  padding: 1.5rem;
  height: 100%;
  box-shadow: var(--ldh-shadow);
}
.ldh-feature .ldh-feature-icon { font-size: 2rem; }

/* Cartes tarifs */
.ldh-price {
  background: var(--ldh-surface);
  border: 1px solid var(--ldh-border);
  border-radius: var(--ldh-radius);
  padding: 1.75rem;
  height: 100%;
  text-align: center;
  box-shadow: var(--ldh-shadow);
}
.ldh-price .ldh-amount { font-size: 2.4rem; font-weight: 700; color: var(--ldh-hibiscus-dark); }
.ldh-price--highlight { border-color: var(--ldh-soleil); box-shadow: 0 12px 34px rgba(244,183,64,.25); }

/* FAQ (accordéon Bootstrap, accents) */
.ldh-site .accordion-button:not(.collapsed) { background: #fbe7d3; color: var(--ldh-hibiscus-dark); }
.ldh-site .accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(244,183,64,.4); }

/* Pages légales / contenu long */
.ldh-prose { max-width: 760px; }
.ldh-prose h2 { font-size: 1.3rem; margin-top: 2rem; color: #3a2d23; }
.ldh-prose h3 { font-size: 1.08rem; margin-top: 1.25rem; }
.ldh-placeholder { background: #fff6e6; border: 1px dashed var(--ldh-soleil); border-radius: 8px; padding: .1rem .4rem; }

/* Bandeau cookies / RGPD */
.ldh-rgpd {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 1030;
  max-width: 780px; margin: 0 auto;
  background: var(--ldh-surface); border: 1px solid var(--ldh-border);
  border-radius: 14px; box-shadow: 0 12px 34px rgba(60,40,20,.18);
  padding: .9rem 1.1rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
}
.ldh-rgpd p { margin: 0; flex: 1 1 320px; font-size: .9rem; color: var(--ldh-text); }
.ldh-rgpd .btn { white-space: nowrap; }

.ldh-footer-site { background: var(--ldh-surface); border-top: 1px solid var(--ldh-border); }
.ldh-footer-site a { color: var(--ldh-feuillage); text-decoration: none; }
.ldh-footer-site a:hover { text-decoration: none; color: var(--ldh-hibiscus-dark); }

/* Sélecteur de créneaux (prise de RDV) */
.ldh-slots { display: flex; flex-direction: column; gap: 1rem; max-height: 60vh; overflow-y: auto; padding-right: .25rem; }
.ldh-slot-day { background: var(--ldh-surface); border: 1px solid var(--ldh-border); border-radius: var(--ldh-radius); padding: 1rem; }
.ldh-slot-daylabel { font-weight: 600; margin-bottom: .6rem; color: #3a2d23; }
.ldh-slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .5rem; }
.ldh-slot { position: relative; }
.ldh-slot input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ldh-slot span {
  display: block; text-align: center; padding: .5rem .25rem;
  border: 1px solid var(--ldh-border); border-radius: 10px; cursor: pointer;
  font-variant-numeric: tabular-nums; transition: background .12s, border-color .12s;
}
.ldh-slot input:hover + span { border-color: var(--ldh-soleil); }
.ldh-slot input:checked + span { background: var(--ldh-hibiscus); border-color: var(--ldh-hibiscus); color: #fff; font-weight: 600; }
.ldh-slot input:focus-visible + span { outline: 2px solid var(--ldh-soleil); outline-offset: 2px; }

/* Barre de navigation basse (PWA espace consultant) */
.ldh-appbar {
  position: sticky; bottom: 0; z-index: 1020;
  display: flex; justify-content: space-around;
  background: var(--ldh-surface); border-top: 1px solid var(--ldh-border);
  padding: .35rem 0 calc(.35rem + env(safe-area-inset-bottom));
}
.ldh-appbar a {
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  font-size: .72rem; color: var(--ldh-muted); text-decoration: none; padding: .25rem .75rem; border-radius: 10px;
}
.ldh-appbar a span { font-size: 1.3rem; line-height: 1; }
.ldh-appbar a.is-active { color: var(--ldh-hibiscus-dark); font-weight: 600; }

/* Messagerie (bulles) */
.ldh-chat { display: flex; flex-direction: column; gap: .5rem; }
.ldh-bulle { max-width: 78%; padding: .55rem .8rem; border-radius: 14px; line-height: 1.4; }
.ldh-bulle small { display: block; font-size: .72rem; opacity: .7; margin-top: .2rem; }
.ldh-bulle--moi { align-self: flex-end; background: var(--ldh-hibiscus); color: #fff; border-bottom-right-radius: 4px; }
.ldh-bulle--autre { align-self: flex-start; background: #fff; border: 1px solid var(--ldh-border); border-bottom-left-radius: 4px; }
.ldh-urgence { background: #fff6e6; border: 1px solid var(--ldh-soleil); border-radius: 10px; padding: .6rem .9rem; font-size: .9rem; }

/* Humeur (journal) */
.ldh-humeur { font-size: 1.4rem; }

/* Citation éditoriale (pages vitrine) */
.ldh-quote {
  border-left: 3px solid var(--ldh-hibiscus);
  padding: .25rem 0 .25rem 1rem;
  font-size: 1.15rem; font-style: italic; color: var(--ldh-hibiscus-dark);
}

/* Étiquettes (motifs de consultation) */
.ldh-tags { padding-left: 0; }
.ldh-tag {
  background: #fbe7d3; color: var(--ldh-hibiscus-dark);
  font-weight: 500; font-size: .85rem; padding: .4rem .8rem;
}

/* Bloc dépliable discret (aide installation) */
.ldh-details { border-top: 1px solid var(--ldh-border); padding-top: .75rem; }
.ldh-details > summary {
  cursor: pointer; font-size: .9rem; list-style: none;
}
.ldh-details > summary::-webkit-details-marker { display: none; }
.ldh-details > summary::before { content: "› "; color: var(--ldh-hibiscus); font-weight: 700; }
.ldh-details[open] > summary::before { content: "⌄ "; }

/* Calendrier FullCalendar — accents */
.fc .fc-button-primary { background: var(--ldh-hibiscus); border-color: var(--ldh-hibiscus); }
.fc .fc-button-primary:hover { background: var(--ldh-hibiscus-dark); border-color: var(--ldh-hibiscus-dark); }
.fc .fc-button-primary:not(:disabled).fc-button-active { background: var(--ldh-hibiscus-dark); border-color: var(--ldh-hibiscus-dark); }
.fc .fc-col-header-cell-cushion, .fc .fc-timegrid-axis-cushion { color: var(--ldh-text); }
.fc-event { cursor: grab; }
.fc-event:active { cursor: grabbing; }
