/* ==========================================================
   Joshua Kafil — Avocat | Sobre, monochrome, impressionnant
   ========================================================== */

:root {
  --bg: #050505;
  --bg-card: #0b0b0b;
  --border: #242424;
  --border-soft: #1a1a1a;
  --white: #f5f5f5;
  --grey: #8d8d8d;
  --grey-dim: #666;
  --grey-dark: #555;
  --error: #e08585;
  --success: #7fd6a3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.6;
}

.wrap {
  max-width: 1050px;
  margin: 0 auto;
  padding: 52px 24px 80px;
}

a { color: var(--grey); }

/* ---------- Header ---------- */
header.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
}

.hero-kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-dim);
  margin-bottom: 18px;
}

.brand-main {
  font: 400 42px 'Engravers MT', 'Times New Roman', serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1.2;
}

.brand-sub {
  font: 12px Arial, Helvetica, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey-dim);
  margin-top: 12px;
}

/* ---------- Bandeau urgence pénale ---------- */
.urgence-banner {
  background: var(--bg-card);
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.7;
  color: #d8d8d8;
}

.urgence-banner strong {
  color: var(--white);
  font-weight: 700;
}

.urgence-banner .urgence-phone {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--white);
  letter-spacing: 0.02em;
}

/* ---------- Bandeau des deux offres ---------- */
.offer-info {
  margin-bottom: 40px;
}

.offer-info ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.offer-info li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.7;
  color: #cfcfcf;
}

.offer-info li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--white);
  font-weight: 700;
}

.offer-info li strong {
  color: var(--white);
}

/* ---------- Bouton de paiement SumUp ---------- */
.payment-cta {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.btn-pay {
  display: inline-block;
  margin-top: 8px;
  padding: 13px 24px;
  border: 1px solid var(--white);
  border-radius: 8px;
  background: var(--white);
  color: #080808;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}

.btn-pay:hover { opacity: 0.85; }

.optional-hint {
  color: var(--grey-dark);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.field-note {
  font-size: 11px;
  color: var(--grey-dim);
  margin: 8px 0 0;
}

.field-note a { color: var(--grey); }

/* ---------- Layout principal ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 27px;
}

.label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--grey-dim);
  margin-bottom: 15px;
}

/* ---------- Switch nouveau / existant ---------- */
.switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #292929;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}

.switch button {
  background: transparent;
  border: 0;
  color: var(--grey);
  padding: 11px;
  border-radius: 7px;
  font: inherit;
  cursor: pointer;
  font-size: 0.9rem;
}

.switch button.active {
  background: #eee;
  color: #080808;
  font-weight: 600;
}

.choice {
  border: 1px solid #292929;
  border-radius: 10px;
  padding: 17px;
  margin: 0 0 20px;
  background: #0d0d0d;
}

.choice strong { font-size: 15px; font-weight: 600; display: block; }
.choice span { display: block; color: var(--grey); font-size: 13px; margin-top: 5px; }

/* ---------- Formulaire ---------- */
.form-row { margin-bottom: 16px; }

.fields-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

label.field-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-dim);
  margin-bottom: 6px;
}

input, textarea {
  width: 100%;
  background: #080808;
  color: var(--white);
  border: 1px solid #292929;
  border-radius: 8px;
  padding: 12px 13px;
  font: inherit;
  outline: none;
  font-size: 0.92rem;
}

input:focus, textarea:focus { border-color: #666; }
input::placeholder, textarea::placeholder { color: var(--grey-dark); }
textarea { min-height: 90px; resize: vertical; }

.btn-submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #eee;
  color: #080808;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-submit:hover { opacity: 0.85; }
.btn-submit:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---------- Calendrier ---------- */
.calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calendar-month {
  font: 20px Georgia, serif;
}

.calendar-arrow {
  background: #111;
  border: 1px solid #303030;
  color: #eee;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.calendar-arrow:disabled { opacity: 0.3; cursor: not-allowed; }

.calendar-week, .calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  text-align: center;
}

.calendar-week {
  font-size: 10px;
  color: #686868;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.calendar-day {
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 13px;
  color: #444;
}

.calendar-day.available {
  color: #ddd;
  cursor: pointer;
}

.calendar-day.available:hover { background: #161616; }

.calendar-day.selected {
  background: #eee;
  color: #080808;
  font-weight: 700;
}

.times-wrap { margin-top: 22px; }

.times {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.time-slot {
  background: #0b0b0b;
  color: #ddd;
  border: 1px solid #292929;
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 13px;
  cursor: pointer;
}

.time-slot:hover { border-color: #555; }

.time-slot.selected {
  background: #eee;
  color: #080808;
  border-color: #eee;
  font-weight: 700;
}

.time-slot.unavailable {
  opacity: 0.25;
  cursor: not-allowed;
  text-decoration: line-through;
}

.times-empty {
  color: var(--grey-dim);
  font-style: italic;
  font-size: 13px;
}

/* ---------- Messages ---------- */
.alert {
  padding: 16px 18px;
  border-radius: 10px;
  margin-bottom: 22px;
  font-size: 0.92rem;
  border: 1px solid;
}
.alert-success { background: rgba(127,214,163,0.06); border-color: #3a5a48; color: var(--success); }
.alert-error { background: rgba(224,133,133,0.06); border-color: #5a3a3a; color: var(--error); }

/* ---------- RGPD / Confidentialité ---------- */
.privacy {
  margin-top: 30px;
  padding: 22px 24px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #090909;
  color: var(--grey-dim);
  font-size: 11px;
  line-height: 1.65;
}

.privacy-title {
  color: #ddd;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}

.privacy p { margin: 8px 0; }
.privacy a { color: var(--grey); }
.privacy-small { color: var(--grey-dark); }

/* ---------- Footer ---------- */
footer.site-footer {
  text-align: center;
  color: var(--grey-dark);
  font-size: 11px;
  margin-top: 22px;
}

/* ---------- Admin ---------- */
.admin-body { background: var(--bg); }

.admin-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px;
}

.login-box {
  max-width: 380px;
  margin: 80px auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: 14px;
}

table.appointments {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 0.9rem;
}

table.appointments th, table.appointments td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

table.appointments th {
  color: var(--grey);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  display: inline-block;
  border: 1px solid #333;
}
.badge-en_attente { color: #ccc; }
.badge-confirme { color: var(--success); border-color: #3a5a48; }
.badge-annule { color: var(--error); border-color: #5a3a3a; }
.badge-termine { color: var(--grey-dim); }

.action-link { font-size: 0.8rem; margin-right: 10px; color: #aaa; }

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .fields-2col { grid-template-columns: 1fr; }
  .brand-main { font-size: 30px; }
}

/* ---------- Cases d'acceptation (consultation) ---------- */
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--grey); line-height: 1.5; margin-bottom: 10px; cursor: pointer; }
.consent input[type=checkbox] { width: 16px; height: 16px; min-width: 16px; padding: 0; margin: 2px 0 0; accent-color: #fff; }
.consent a { color: #ddd; }
.site-footer { line-height: 1.8; }
.site-footer a { color: var(--grey); }

/* ---------- Page conditions ---------- */
.legal-page { max-width: 760px; margin: 0 auto 40px; }
.legal-page h2 { font-size: 18px; margin: 36px 0 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.legal-page h3 { font-size: 14px; margin: 18px 0 6px; color: #ddd; }
.legal-page p, .legal-page li { font-size: 14px; line-height: 1.65; color: var(--grey); }
.legal-page .back { display: inline-block; margin-bottom: 10px; font-size: 13px; }
.legal-page .formulaire { border: 1px solid var(--border); padding: 14px 18px; border-radius: 8px; }

/* ---------- En-tête « tableau » (identique au site kafil-avocat.com) ---------- */
@font-face { font-family: 'Bodoni Moda'; src: url('../fonts/bodoni-moda-latin-standard-normal.woff2') format('woff2'); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Bodoni Moda'; src: url('../fonts/bodoni-moda-latin-standard-italic.woff2') format('woff2'); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

body { overflow-x: hidden; }

header.site-header.hero {
  position: relative;
  overflow: hidden;
  width: 100vw;
  margin: -52px calc(50% - 50vw) 44px;
  min-height: 46vh;
  min-height: 46svh;
  padding: 26px 20px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
header.hero .hero-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(180deg, rgba(3,3,3,.62) 0%, rgba(3,3,3,.45) 35%, rgba(3,3,3,.86) 80%, #050505 100%),
    url('https://commons.wikimedia.org/wiki/Special:FilePath/Theodore_Gericault_Raft_of_the_Medusa-1.jpg?width=1800');
  background-size: cover;
  background-position: center 38%;
  filter: grayscale(1) contrast(1.08);
  opacity: 0;
  transform: scale(1.06);
  animation: heroIn 2s cubic-bezier(.16,.8,.24,1) .1s forwards;
}
header.hero .hero-nav, header.hero .hero-center { position: relative; z-index: 2; }
header.hero .hero-nav a {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(242,240,235,.62); text-decoration: none; padding-bottom: 4px; border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
header.hero .hero-nav a:hover { color: #f2f0eb; border-color: rgba(242,240,235,.28); }
header.hero .hero-center { text-align: center; margin-top: 40px; }
header.hero .hero-kicker {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(242,240,235,.62); margin-bottom: 20px;
}
header.hero .wordmark {
  font-family: 'Bodoni Moda', serif; font-weight: 540; font-optical-sizing: none; font-variation-settings: 'opsz' 11;
  font-size: clamp(30px, 5.6vw, 62px); letter-spacing: .05em; text-transform: uppercase; line-height: 1.05;
  margin: 0; color: #f2f0eb; text-shadow: 0 2px 30px rgba(0,0,0,.45);
  opacity: 0; animation: riseIn 1.3s cubic-bezier(.16,.8,.24,1) .5s forwards;
}
header.hero .hero-rule { width: 64px; height: 1px; margin: 22px auto 0; background: rgba(242,240,235,.28); }
header.hero .subtitle {
  font-family: 'Bodoni Moda', serif; font-style: italic; font-weight: 450; font-optical-sizing: none; font-variation-settings: 'opsz' 11;
  font-size: clamp(14px, 1.6vw, 17px); color: rgba(242,240,235,.62); letter-spacing: .03em; margin: 16px 0 0;
}
@keyframes heroIn { to { opacity: 1; transform: scale(1); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  header.site-header.hero { min-height: 40vh; min-height: 40svh; }
  header.hero .wordmark { font-size: clamp(28px, 9.5vw, 42px); }
}
@media (prefers-reduced-motion: reduce) {
  header.hero .hero-bg, header.hero .wordmark { animation: none; opacity: 1; transform: none; }
}
