:root {
  --navy: #0A1F5C;
  --navy-dark: #061438;
  --gold: #C9A227;
  --gold-soft: #F5EED8;
  --light: #F4F6FB;
  --text: #1A1A1A;
  --muted: #5A5A5A;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(10, 31, 92, 0.08);
  --max: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Source Sans 3", system-ui, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

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

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

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e8ecf5;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--navy);
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.2rem;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.8rem;
}

.nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  color: var(--navy);
  cursor: pointer;
}

.language-switcher:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-inline-start: 1px solid #d0d7e8;
  padding-inline-start: 1rem;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 600;
}

.language-switcher select {
  padding: 0.5rem;
  border: 1px solid #d0d7e8;
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  cursor: pointer;
}

.language-switcher select:hover {
  border-color: var(--gold);
}

.language-switcher select:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

/* Hero */
.hero {
  background:
    radial-gradient(circle at top right, rgba(201,162,39,0.12), transparent 40%),
    linear-gradient(180deg, #f7f9fd 0%, #ffffff 100%);
  padding: 4rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-visual img {
  width: min(280px, 100%);
  filter: drop-shadow(0 12px 30px rgba(10,31,92,0.15));
}

.home-quote {
  padding: 2.5rem 0;
  background: var(--gold-soft);
  color: var(--navy);
  text-align: center;
}

.home-quote blockquote {
  max-width: 48rem;
  margin-inline: auto;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.35;
}

.home-quote figcaption {
  margin-top: 1rem;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  border: 2px solid transparent;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--navy-dark);
  color: var(--white);
}

.btn-outline {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--light);
}

.section h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.section-intro {
  color: var(--muted);
  margin-bottom: 1.75rem;
  max-width: 40rem;
}

.cultural-news + .cultural-news {
  margin-top: 1.5rem;
}

.cultural-news p {
  margin-bottom: 1rem;
}

.cultural-news .btn {
  flex-wrap: wrap;
  gap: 0.35rem;
}

.event-poster {
  display: block;
  max-width: 380px;
  margin-bottom: 1rem;
}

.event-poster img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.event-poster > span {
  display: block;
  margin-top: 0.5rem;
  text-decoration: underline;
}

.cultural-watch {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--gold);
}

.cultural-archives {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--gold);
}

.cultural-archives summary {
  color: var(--navy);
  cursor: pointer;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

.cultural-archives > p,
.cultural-archives > h3,
.cultural-archives > button {
  margin-top: 1.5rem;
}

.cultural-archives [hidden] {
  display: none;
}

.watch-label {
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cultural-watch > h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--navy);
  margin-block: 0.5rem 1rem;
}

.watch-explainer,
.watch-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.watch-status {
  margin-block: 1rem 1.5rem;
  padding: 0.85rem 1rem;
  background: var(--light);
  border-inline-start: 3px solid var(--gold);
}

.watch-warning {
  border-inline-start-color: #a05b16;
}

.watch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
}

.watch-grid .cultural-news {
  margin-top: 0;
}

.watch-grid .cultural-news h4,
.watch-grid .cultural-news h5 {
  color: var(--navy);
  font-size: 1.1rem;
  line-height: 1.4;
  margin-bottom: 1rem;
  overflow-wrap: anywhere;
}

.location-group + .location-group {
  margin-top: 2rem;
}

.location-heading {
  color: var(--navy);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.65rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  overflow-wrap: anywhere;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.card {
  background: var(--white);
  border: 1px solid #e6ebf5;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card h3 {
  color: var(--navy);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.info-card {
  background: linear-gradient(180deg, #ffffff, var(--gold-soft));
}

.info-list {
  list-style: none;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(10,31,92,0.08);
  font-size: 0.95rem;
}

.info-list li span { color: var(--muted); }
.info-list li strong { color: var(--navy); text-align: end; }

.festival-banner {
  margin-top: 1rem;
  background: linear-gradient(135deg, var(--navy) 0%, #16357a 100%);
  color: var(--white);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.festival-banner .eyebrow { color: var(--gold); }
.festival-banner h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.festival-booking {
  margin-top: 2.5rem;
}

.festival-booking h3 {
  color: var(--navy);
  margin-bottom: 1rem;
}

.festival-booking iframe {
  display: block;
  width: 100%;
  border: none;
}

.festival-booking p {
  margin-top: 1rem;
}

.festival-booking a {
  text-decoration: underline;
}

.checklist {
  margin: 1rem 0 1.25rem 1.1rem;
}

.checklist li { margin-bottom: 0.35rem; }

.tarif {
  background: rgba(255,255,255,0.08);
  display: inline-block;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
}

.tarifs .price {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  color: var(--navy);
  font-weight: 700;
  margin: 0.25rem 0 0.4rem;
}

.note-center, .center {
  text-align: center;
  margin-top: 1.25rem;
}

.note-center {
  color: var(--muted);
  font-size: 0.95rem;
}

.small { font-size: 0.9rem; color: var(--muted); }

.bank-details {
  margin-top: 1.5rem;
}

.bank-details p {
  margin-bottom: 1rem;
}

.bank-details p a,
.contact-side p a[href$=".pdf"] {
  text-decoration: underline;
}

/* Footer */
.footer {
  background: var(--navy-dark);
  color: #d9e0f0;
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 50%;
  padding: 4px;
}

.footer-brand strong {
  display: block;
  color: white;
}

.footer-brand span {
  font-size: 0.85rem;
  opacity: 0.8;
}

.footer-copy {
  font-size: 0.85rem;
  opacity: 0.75;
}

/* Responsive */
@media (max-width: 1200px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid #e8ecf5;
  }
  .nav.open { display: flex; }
  .language-switcher:not([hidden]) {
    border-inline-start: 0;
    border-top: 1px solid #e8ecf5;
    padding: 0.75rem 0 0;
  }
}

@media (max-width: 800px) {
  .hero-grid, .grid-2 {
    grid-template-columns: 1fr;
  }
  .hero { padding-top: 2.5rem; }
  .hero-visual { order: -1; }
  .hero-visual img { width: 180px; margin-inline: auto; }
}

/* Contact form */
.contact-grid {
  align-items: start;
}

.contact-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin: 0.85rem 0 0.35rem;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid #d0d7e8;
  border-radius: 10px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(10, 31, 92, 0.25);
  border-color: var(--navy);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.form-note {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}

.form-help {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.85rem;
}

.btn-block {
  width: 100%;
  margin-top: 1rem;
}

/* Legal page */
.legal h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.legal h2 {
  font-size: 1.25rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.legal ul {
  margin: 0.5rem 0 1rem 1.2rem;
}

.legal li {
  margin-bottom: 0.3rem;
}

.narrow {
  max-width: 760px;
}

.back {
  margin-top: 2rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: #d9e0f0;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--gold);
}

/* Arabic uses natural spacing and a comfortable line height. */
html[dir="rtl"] body { line-height: 1.85; }
html[dir="rtl"] .eyebrow,
html[dir="rtl"] .watch-label,
html[dir="rtl"] .library-caption,
html[dir="rtl"] .library-card-theme { letter-spacing: normal; }
input[type="email"], input[type="tel"] { direction: ltr; text-align: start; }

/* Tifinagh glyph coverage for the Tamasheq interface and the language picker. */
html[lang="tmh-Tfng"] body,
html[lang="tmh-Tfng"] h1,
html[lang="tmh-Tfng"] h2,
html[lang="tmh-Tfng"] h3,
html[lang="tmh-Tfng"] h4,
html[lang="tmh-Tfng"] .brand-text strong,
html[lang="tmh-Tfng"] .cultural-archives summary,
html[lang="tmh-Tfng"] .price,
html[lang="tmh-Tfng"] input,
html[lang="tmh-Tfng"] button,
html[lang="tmh-Tfng"] textarea,
select#languageSelect,
html[lang="tmh-Tfng"] select {
  font-family: "Source Sans 3", "Noto Sans Tifinagh", sans-serif;
}
html[lang="tmh-Tfng"] {
  overflow-wrap: break-word;
}
