/* ==========================================================================
   Maghreb Business Club — feuille de style
   Palette : encre de nuit · parchemin · laiton
   ========================================================================== */

:root {
  --ink:        #0C1522;
  --ink-2:      #121D30;
  --ink-3:      #1A2740;
  --line:       rgba(198, 166, 100, 0.22);
  --line-soft:  rgba(237, 232, 221, 0.10);

  --parchment:  #F7F3EA;
  --parchment-2:#EFE9DB;

  --brass:      #C6A664;
  --brass-hi:   #E0C68C;
  --clay:       #A8573C;

  --text:       #EDE8DD;
  --text-dim:   #9FAAC0;
  --text-dark:  #16202F;
  --text-dark-dim: #5B6879;

  --serif: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
  --sans:  'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;

  --maxw: 1120px;
  --gut: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--brass-hi); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
}

/* ---------- Typographie ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.12;
  margin: 0;
}

h1 { font-size: clamp(2.9rem, 7.5vw, 5.1rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h3 { font-size: 1.35rem; letter-spacing: 0; }

p { margin: 0 0 1.1em; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 1.4rem;
}

.lede {
  font-size: clamp(1.08rem, 1.9vw, 1.3rem);
  color: var(--text-dim);
  max-width: 62ch;
}

.serif-quote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.2vw, 2.15rem);
  line-height: 1.35;
  font-style: italic;
  color: var(--text);
  max-width: 30ch;
}

/* ---------- Barre de navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(12, 21, 34, 0.82);
  border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }

.brand-mark { width: 26px; height: 26px; flex-shrink: 0; }

.brand-text {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-links .btn-sm {
  border: 1px solid var(--line);
  color: var(--brass-hi);
  padding: 8px 17px;
  border-radius: 2px;
}
.nav-links .btn-sm:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--ink);
}

@media (max-width: 780px) {
  .nav-links a:not(.btn-sm) { display: none; }
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 15px 32px;
  border-radius: 2px;
  border: 1px solid var(--brass);
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--brass); color: var(--ink); }
.btn-primary:hover { background: var(--brass-hi); border-color: var(--brass-hi); }

.btn-ghost { background: transparent; color: var(--brass-hi); }
.btn-ghost:hover { background: rgba(198, 166, 100, 0.10); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2.4rem; }

/* ---------- Section « héros » ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 12vw, 140px) 0 clamp(60px, 9vw, 104px);
  background:
    radial-gradient(1100px 620px at 78% -12%, rgba(198, 166, 100, 0.13), transparent 62%),
    linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 100%);
  border-bottom: 1px solid var(--line-soft);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.055;
  pointer-events: none;
}

.hero .wrap { position: relative; z-index: 2; }

.hero h1 { margin-bottom: 1.6rem; }
.hero h1 .accent { color: var(--brass); font-style: italic; }

.hero-lede { font-size: clamp(1.12rem, 2.1vw, 1.42rem); max-width: 34ch; color: var(--text-dim); }

/* Carte « prochaine rencontre » */
.next-card {
  margin-top: clamp(48px, 7vw, 76px);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(26, 39, 64, 0.45);
  padding: clamp(24px, 3.5vw, 34px);
  display: grid;
  grid-template-columns: auto 1px 1fr auto;
  align-items: center;
  gap: clamp(20px, 3.5vw, 40px);
  max-width: 860px;
}

.next-date {
  text-align: center;
  min-width: 92px;
}
.next-date .d {
  font-family: var(--serif);
  font-size: 3.2rem;
  line-height: 1;
  color: var(--brass);
  display: block;
}
.next-date .m {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 6px;
  display: block;
}

.next-div { background: var(--line); align-self: stretch; }

.next-body h3 { margin-bottom: 5px; }
.next-body p { margin: 0; color: var(--text-dim); font-size: 0.93rem; }

@media (max-width: 720px) {
  .next-card { grid-template-columns: 1fr; text-align: left; }
  .next-div { display: none; }
  .next-date { text-align: left; display: flex; align-items: baseline; gap: 10px; }
  .next-date .m { margin-top: 0; }
}

/* ---------- Sections génériques ---------- */

section { padding: clamp(72px, 10vw, 128px) 0; }

.sec-light {
  background: var(--parchment);
  color: var(--text-dark);
}
.sec-light h2, .sec-light h3 { color: var(--text-dark); }
.sec-light .lede { color: var(--text-dark-dim); }
.sec-light .eyebrow { color: var(--clay); }
.sec-light a { color: var(--clay); }

.sec-alt { background: var(--ink-2); }

.sec-head { max-width: 68ch; margin-bottom: clamp(44px, 6vw, 68px); }

/* Filet décoratif à l'étoile */
.rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 2.6rem;
}
.rule::before, .rule::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.rule svg { width: 15px; height: 15px; flex-shrink: 0; }
.rule.rule-left::before { display: none; }
.rule.rule-left { max-width: 220px; }

/* ---------- Grille des principes ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

.principle {
  background: var(--ink);
  padding: clamp(28px, 3.4vw, 40px);
}
.sec-alt .principle { background: var(--ink-2); }

.principle .num {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--brass);
  display: block;
  margin-bottom: 18px;
}
.principle h3 { margin-bottom: 11px; font-size: 1.16rem; }
.principle p { color: var(--text-dim); font-size: 0.94rem; margin: 0; }

/* ---------- Déroulé de soirée ---------- */

.timeline { border-top: 1px solid rgba(22, 32, 47, 0.14); }

.slot {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: clamp(18px, 4vw, 48px);
  padding: 30px 0;
  border-bottom: 1px solid rgba(22, 32, 47, 0.14);
  align-items: start;
}

.slot .t {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--clay);
  line-height: 1.1;
  padding-top: 2px;
}
.slot h3 { font-size: 1.18rem; margin-bottom: 7px; }
.slot p { color: var(--text-dark-dim); margin: 0; font-size: 0.96rem; max-width: 58ch; }

@media (max-width: 620px) {
  .slot { grid-template-columns: 1fr; gap: 8px; }
  .slot .t { font-size: 1.25rem; }
}

/* ---------- Le lieu ---------- */

.venue-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(36px, 6vw, 76px);
  align-items: center;
}
@media (max-width: 860px) { .venue-grid { grid-template-columns: 1fr; } }

.venue-facts { list-style: none; margin: 2.2rem 0 0; padding: 0; }
.venue-facts li {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 0.94rem;
}
.venue-facts li span:first-child {
  color: var(--brass);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-top: 3px;
}
.venue-facts li span:last-child { color: var(--text-dim); }

.venue-panel {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: clamp(30px, 4vw, 46px);
  background: linear-gradient(160deg, rgba(26,39,64,0.66), rgba(12,21,34,0.35));
  position: relative;
  overflow: hidden;
}
.venue-panel .star-bg {
  position: absolute;
  right: -46px;
  bottom: -46px;
  width: 210px;
  opacity: 0.07;
  pointer-events: none;
}
.venue-panel p:last-child { margin-bottom: 0; }

/* ---------- Le premier cercle ---------- */

.sectors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: rgba(22, 32, 47, 0.13);
  border: 1px solid rgba(22, 32, 47, 0.13);
  margin-top: 2.6rem;
}
.sector {
  background: var(--parchment);
  padding: 24px 22px;
}
.sector strong {
  display: block;
  font-size: 0.96rem;
  margin-bottom: 4px;
  color: var(--text-dark);
}
.sector span { font-size: 0.86rem; color: var(--text-dark-dim); }

/* ---------- Formulaire de candidature ---------- */

.apply-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}
@media (max-width: 880px) { .apply-grid { grid-template-columns: 1fr; } }

.form-card {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(26, 39, 64, 0.36);
  padding: clamp(26px, 3.6vw, 44px);
}

.field { margin-bottom: 20px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
label .opt { color: rgba(159,170,192,0.55); font-weight: 400; letter-spacing: 0.04em; text-transform: none; }

input[type="text"],
input[type="email"],
input[type="url"],
textarea,
select {
  width: 100%;
  background: rgba(12, 21, 34, 0.62);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(198, 166, 100, 0.12);
}
textarea { min-height: 108px; resize: vertical; line-height: 1.55; }

.hint { font-size: 0.82rem; color: rgba(159,170,192,0.72); margin: 7px 0 0; }

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 26px 0 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.consent input { margin-top: 4px; accent-color: var(--brass); width: 16px; height: 16px; flex-shrink: 0; }
.consent label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0;
}

.form-ok {
  display: none;
  border: 1px solid var(--brass);
  background: rgba(198, 166, 100, 0.10);
  border-radius: 2px;
  padding: 18px 20px;
  margin-bottom: 22px;
  font-size: 0.92rem;
}
.form-ok.show { display: block; }
.form-ok strong { color: var(--brass-hi); display: block; margin-bottom: 4px; }

/* ---------- FAQ ---------- */

.faq { max-width: 800px; border-top: 1px solid var(--line-soft); }

.faq details {
  border-bottom: 1px solid var(--line-soft);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 40px 22px 0;
  font-family: var(--serif);
  font-size: 1.28rem;
  color: var(--text);
  position: relative;
  transition: color 0.15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--brass-hi); }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brass);
  font-family: var(--sans);
  font-size: 1.3rem;
  font-weight: 300;
}
.faq details[open] summary::after { content: "–"; }
.faq details p {
  color: var(--text-dim);
  font-size: 0.96rem;
  margin: 0 0 22px;
  max-width: 68ch;
  padding-right: 40px;
}

/* ---------- Pied de page ---------- */

.footer {
  background: #080E17;
  border-top: 1px solid var(--line-soft);
  padding: clamp(52px, 7vw, 76px) 0 34px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(28px, 5vw, 60px);
  padding-bottom: 42px;
  border-bottom: 1px solid var(--line-soft);
}
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; } }

.footer h4 {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 16px;
  font-weight: 600;
}
.footer p, .footer li { color: var(--text-dim); font-size: 0.9rem; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 9px; }
.footer a { color: var(--text-dim); }
.footer a:hover { color: var(--brass-hi); }

.footer-legal {
  padding-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(159,170,192,0.62);
}

.placeholder {
  border-bottom: 1px dashed rgba(198,166,100,0.5);
  color: var(--brass);
}

/* ---------- Page de contenu (confidentialité) ---------- */

.doc { padding: clamp(56px, 8vw, 96px) 0 clamp(72px, 9vw, 110px); }
.doc-inner { max-width: 760px; }
.doc h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); margin-bottom: 1rem; }
.doc h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); margin: 2.8rem 0 0.9rem; }
.doc p, .doc li { color: var(--text-dim); font-size: 0.98rem; }
.doc ul { padding-left: 22px; margin: 0 0 1.2em; }
.doc li { margin-bottom: 8px; }
.doc .meta { font-size: 0.85rem; color: rgba(159,170,192,0.6); }
.doc strong { color: var(--text); font-weight: 600; }

/* ==========================================================================
   Corrections de contraste sur fond clair + finitions
   ========================================================================== */

/* La FAQ posée sur le parchemin héritait des couleurs du thème sombre. */
.sec-light .faq { border-top-color: rgba(22, 32, 47, 0.16); }
.sec-light .faq details { border-bottom-color: rgba(22, 32, 47, 0.16); }
.sec-light .faq summary { color: var(--text-dark); }
.sec-light .faq summary:hover { color: var(--clay); }
.sec-light .faq summary::after { color: var(--clay); }
.sec-light .faq details p { color: var(--text-dark-dim); }
.sec-light .faq details p strong { color: var(--text-dark); font-weight: 600; }
.sec-light .placeholder { color: var(--clay); border-bottom-color: rgba(168, 87, 60, 0.5); }
.sec-light .rule::before, .sec-light .rule::after { background: rgba(22, 32, 47, 0.16); }

/* Chiffres alignés : Cormorant sort des chiffres elzéviriens, « 13 » se lisait « I3 ». */
.next-date .d {
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}

/* Filigrane du panneau « membre fondateur » : trait plutôt qu'aplat. */
.venue-panel .star-bg { opacity: 0.10; }
