/* ============================================================
   CMAC — Cour Marocaine d'Arbitrage de la Construction
   Feuille de style principale
   ============================================================ */

:root {
  --navy: #0d2440;
  --navy-2: #143150;
  --navy-light: #1b3a5c;
  --gold: #b9924f;
  --gold-light: #d4b37a;
  --ink: #24303d;
  --muted: #5c6b7a;
  --paper: #f7f5f1;
  --white: #ffffff;
  --line: #e4ded4;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(13, 36, 64, 0.10);
  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 17px;
}

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

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.topbar {
  background: var(--navy);
  color: #cfd8e3;
  font-size: 13.5px;
  padding: 7px 0;
}
.topbar .container {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap;
}
.topbar a { color: #cfd8e3; }
.topbar .sep { opacity: .4; margin: 0 8px; }

header.site {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
header.site .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px; gap: 20px;
}

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 52px; height: 52px; flex: 0 0 52px;
  background: var(--navy);
  border: 2px solid var(--gold);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700; font-size: 19px; letter-spacing: .5px;
  color: var(--gold-light);
}
.brand .name {
  font-family: var(--font-serif);
  color: var(--navy);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.2;
}
.brand .name small {
  display: block;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--muted);
}

nav.main { display: flex; align-items: center; gap: 4px; }
nav.main a {
  color: var(--navy);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
}
nav.main a:hover { background: var(--paper); text-decoration: none; color: var(--gold); }
nav.main a.active { color: var(--gold); }
nav.main a.cta {
  background: var(--gold);
  color: var(--white);
  margin-left: 8px;
}
nav.main a.cta:hover { background: #a5813f; color: var(--white); }

/* Mobile nav */
.nav-toggle { display: none; }
label.burger {
  display: none;
  cursor: pointer;
  width: 30px; height: 22px;
  position: relative;
  flex: 0 0 30px;
}
label.burger span, label.burger span::before, label.burger span::after {
  content: ""; position: absolute; left: 0;
  width: 100%; height: 3px; background: var(--navy); border-radius: 2px;
  transition: .2s;
}
label.burger span { top: 9px; }
label.burger span::before { top: -9px; }
label.burger span::after { top: 9px; }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(115deg, rgba(13,36,64,.96) 0%, rgba(20,49,80,.92) 55%, rgba(27,58,92,.85) 100%),
    repeating-linear-gradient(45deg, #1b3a5c 0 2px, transparent 2px 24px);
  background-color: var(--navy);
  color: var(--white);
  padding: 90px 0 100px;
}
.hero .kicker {
  color: var(--gold-light);
  font-size: 14px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 700;
  line-height: 1.15;
  max-width: 780px;
  margin-bottom: 22px;
}
.hero p.lead {
  font-size: 19px;
  color: #d5dde6;
  max-width: 680px;
  margin-bottom: 36px;
}
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: .02em;
}
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: #a5813f; text-decoration: none; }
.btn-ghost {
  border: 1.5px solid rgba(255,255,255,.55);
  color: var(--white);
  margin-left: 12px;
}
.btn-ghost:hover { border-color: var(--gold-light); color: var(--gold-light); text-decoration: none; }

/* Page hero (interior pages) */
.page-hero {
  background:
    linear-gradient(115deg, rgba(13,36,64,.97), rgba(27,58,92,.9)),
    repeating-linear-gradient(45deg, #1b3a5c 0 2px, transparent 2px 24px);
  background-color: var(--navy);
  color: var(--white);
  padding: 56px 0;
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 700;
}
.page-hero .crumb { font-size: 14px; color: #b9c5d2; margin-bottom: 10px; }
.page-hero .crumb a { color: var(--gold-light); }

/* ---------- Sections ---------- */
section.block { padding: 72px 0; }
section.block.alt { background: var(--white); }

.section-title {
  font-family: var(--font-serif);
  color: var(--navy);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700;
  margin-bottom: 14px;
}
.section-title::after {
  content: "";
  display: block;
  width: 64px; height: 3px;
  background: var(--gold);
  margin-top: 12px;
}
.section-sub { color: var(--muted); max-width: 720px; margin-bottom: 34px; }

.grid { display: grid; gap: 26px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: 0 2px 10px rgba(13,36,64,.04);
}
.card h3 {
  font-family: var(--font-serif);
  color: var(--navy);
  font-size: 21px;
  margin-bottom: 10px;
}
.card p { color: var(--muted); font-size: 15.5px; }
.card .num {
  font-family: var(--font-serif);
  font-size: 34px;
  color: var(--gold);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 12px;
}
.card .icon {
  width: 46px; height: 46px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px;
  margin-bottom: 16px;
}

/* ---------- Prose / article ---------- */
.prose { max-width: 800px; }
.prose p { margin-bottom: 18px; }
.prose h2 {
  font-family: var(--font-serif);
  color: var(--navy);
  font-size: 27px;
  margin: 34px 0 14px;
}
.prose h3 {
  font-family: var(--font-serif);
  color: var(--navy);
  font-size: 21px;
  margin: 26px 0 10px;
}
.prose ul, .prose ol { margin: 0 0 18px 22px; }
.prose li { margin-bottom: 8px; }
.prose blockquote {
  border-left: 3px solid var(--gold);
  background: var(--white);
  padding: 20px 24px;
  margin: 24px 0;
  font-style: italic;
  color: var(--navy);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.signature {
  margin-top: 34px;
  font-family: var(--font-serif);
  color: var(--navy);
}
.signature strong { font-size: 20px; display: block; }
.signature span { color: var(--muted); font-family: var(--font-sans); font-size: 14.5px; }

/* President layout */
.president-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: start;
}
.president-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  position: sticky; top: 100px;
}
.president-photo figcaption {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 14px 10px;
  font-family: var(--font-serif);
  font-size: 18px;
}
.president-photo figcaption small {
  display: block;
  font-family: var(--font-sans);
  color: var(--gold-light);
  font-size: 12.5px;
  letter-spacing: .05em;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 15.5px;
  min-width: 640px;
}
table.data th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  text-align: left;
  padding: 14px 18px;
  font-size: 14.5px;
  letter-spacing: .02em;
}
table.data td { padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:nth-child(even) td { background: #fbfaf7; }
table.data tr:last-child td { border-bottom: none; }
table.data td.center, table.data th.center { text-align: center; }
table.data .role { color: var(--gold); font-weight: 600; }

/* ---------- Downloads ---------- */
.doc-list { display: grid; gap: 14px; }
.doc-item {
  display: flex; align-items: center; gap: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  color: inherit;
}
.doc-item:hover { text-decoration: none; border-color: var(--gold); box-shadow: var(--shadow); }
.doc-item .ext {
  flex: 0 0 52px; height: 52px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; letter-spacing: .05em;
}
.doc-item .meta strong { display: block; color: var(--navy); font-size: 16.5px; }
.doc-item .meta span { color: var(--muted); font-size: 14px; }
.doc-item .dl { margin-left: auto; color: var(--gold); font-weight: 700; font-size: 14px; white-space: nowrap; }

/* ---------- Callout ---------- */
.callout {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 40px 44px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
}
.callout h3 { font-family: var(--font-serif); font-size: 26px; margin-bottom: 6px; }
.callout p { color: #c8d2dd; font-size: 15.5px; max-width: 560px; }

/* Clause type box */
.clause-box {
  background: var(--white);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 32px 36px;
  box-shadow: var(--shadow);
  position: relative;
}
.clause-box::before {
  content: "“";
  position: absolute;
  top: -6px; left: 18px;
  font-family: var(--font-serif);
  font-size: 90px;
  color: var(--gold);
  opacity: .35;
  line-height: 1;
}
.clause-box p { font-style: italic; color: var(--navy); margin-bottom: 10px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 34px; align-items: start; }
.contact-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; }
.contact-card h3 { font-family: var(--font-serif); color: var(--navy); font-size: 22px; margin-bottom: 18px; }
.contact-row { display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
.contact-row .ci {
  flex: 0 0 40px; height: 40px; border-radius: 8px;
  background: var(--paper); color: var(--gold);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.contact-row strong { display: block; color: var(--navy); font-size: 15px; }
.contact-row span, .contact-row a { color: var(--muted); font-size: 15px; }
.map-frame {
  border: 0; width: 100%; height: 100%; min-height: 440px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Footer ---------- */
footer.site {
  background: var(--navy);
  color: #aebccb;
  padding: 56px 0 0;
  font-size: 14.5px;
}
footer.site .cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}
footer.site h4 {
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 18px;
  margin-bottom: 16px;
}
footer.site a { color: #aebccb; display: block; padding: 3px 0; }
footer.site a:hover { color: var(--gold-light); }
footer.site .brandline {
  font-family: var(--font-serif);
  color: var(--white);
  font-size: 20px;
  margin-bottom: 10px;
}
footer.site .bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 18px 0;
  font-size: 13px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .president-layout { grid-template-columns: 1fr; }
  .president-photo { position: static; max-width: 320px; }
  .contact-grid { grid-template-columns: 1fr; }
  .map-frame { min-height: 360px; }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  label.burger { display: block; }
  nav.main {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 18px 18px;
    box-shadow: var(--shadow);
  }
  nav.main a { padding: 12px 10px; border-radius: 6px; }
  nav.main a.cta { margin-left: 0; text-align: center; margin-top: 6px; }
  .nav-toggle:checked ~ nav.main { display: flex; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 70px; }
  .btn-ghost { margin-left: 0; margin-top: 12px; }
  .callout { padding: 30px 26px; }
  footer.site .cols { grid-template-columns: 1fr; }
}
