/* ============================================================
   Commune de Ngor — feuille de style
   Démo courte : identité, territoire, tourisme, maire, contact
   ============================================================ */

:root {
  --navy:   #0E2238;
  --navy-2: #173A57;
  --azur:   #1F9FD6;
  --sky:    #9DBBD4;
  --orange: #F89B1C;
  --gold:   #F2B45C;
  --warm:   #B45F08;
  --cream:  #FFF6E8;
  --off:    #F6F8FA;
  --ink:    #46586B;
  --line:   #E4E9EF;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--navy);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
main { overflow-x: clip; }

:focus-visible {
  outline: 3px solid var(--azur);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 34, 56, .98);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  box-shadow: 0 12px 30px rgba(9, 20, 36, .18);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: 0;
  flex: 1 1 auto;
}
.brand__logo {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand__name { color: #fff; font-weight: 700; font-size: 1.04rem; letter-spacing: .2px; }
.brand__sub  { color: var(--sky); font-size: .75rem; }

.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 9px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.burger span {
  height: 2.5px;
  border-radius: 3px;
  background: #fff;
  transition: transform .25s ease, opacity .2s ease;
}
body.nav-open .burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
body.nav-open .burger span:nth-child(2) { opacity: 0; }
body.nav-open .burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1.25rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
body.nav-open .nav { opacity: 1; visibility: visible; transform: translateY(0); }

.nav a {
  color: #dce7f1;
  text-decoration: none;
  font-size: .98rem;
  padding: .7rem 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav a:hover { color: #fff; }
.nav__cta {
  margin-top: .9rem;
  border-bottom: 0 !important;
  background: var(--orange);
  color: var(--navy) !important;
  font-weight: 700;
  text-align: center;
  padding: .7rem 1rem !important;
  border-radius: 999px;
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: clamp(550px, 84vh, 760px);
  display: flex;
  align-items: center;
  background: var(--navy) url("assets/hero.jpg") center 25% / cover no-repeat;
  overflow: hidden;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 32%, rgba(31,159,214,.23), transparent 26%),
    linear-gradient(105deg, rgba(9,20,36,.96) 0%, rgba(9,20,36,.70) 47%, rgba(9,20,36,.28) 100%),
    linear-gradient(to top, rgba(9,20,36,.78) 0%, rgba(9,20,36,0) 46%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 3.2rem 1.4rem;
  color: #fff;
  animation: rise .7s ease both;
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow--warm { color: var(--warm); }

.hero__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.2rem, 7.5vw, 4.8rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.hero__title em { font-style: italic; color: var(--gold); }

.hero__lead {
  margin: 1.1rem 0 1.8rem;
  max-width: 55ch;
  font-size: clamp(1rem, 2.2vw, 1.17rem);
  color: rgba(255,255,255,.88);
}

.hero__actions { display: flex; flex-direction: column; align-items: stretch; gap: .8rem; max-width: 22rem; }

.btn {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: .88rem 1.5rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .98rem;
  text-decoration: none;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn--primary { background: var(--orange); color: var(--navy); }
.btn--primary:hover { transform: translateY(-2px); background: #ffac3a; }
.btn--ghost { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.78); }
.btn--ghost:hover { background: rgba(255,255,255,.15); }

/* ---------------- Intro band ---------------- */
.intro-band {
  background: var(--navy);
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid rgba(255,255,255,.10);
}
.info-card {
  padding: 1.1rem 1.4rem;
  border-top: 1px solid rgba(255,255,255,.10);
}
.info-card:first-child { border-top: 0; }
.info-card__label {
  display: block;
  color: var(--gold);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.info-card strong {
  color: #fff;
  font-size: 1rem;
}

/* ---------------- Sections ---------------- */
.section { padding: clamp(3rem, 7vw, 5.8rem) 1.4rem; }
.section--cream { background: linear-gradient(180deg, var(--cream), #fff); }
.section__inner { max-width: var(--wrap); margin: 0 auto; }
.section__heading { max-width: 760px; margin-bottom: 1.8rem; }
.section h2 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.8vw, 3.05rem);
  line-height: 1.13;
  letter-spacing: -.02em;
}
.section p { color: var(--ink); margin: 0 0 1rem; }
.section p:last-child { margin-bottom: 0; }

.split { display: grid; gap: 2rem; align-items: center; }
.split__body { max-width: 650px; }
.identity-card {
  margin: 0;
  border-radius: 24px;
  background: #fff;
  padding: .72rem;
  box-shadow: 0 20px 50px rgba(14, 34, 56, .14);
  transform: rotate(1.2deg);
}
.identity-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
}
.identity-card figcaption {
  padding: .85rem .35rem .15rem;
  color: var(--ink);
  font-size: .9rem;
}

/* ---------------- Que faire ? mobile-first ---------------- */
.section__heading--with-note {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.swipe-note {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .2rem;
  padding: .48rem .78rem;
  border-radius: 999px;
  background: rgba(248,155,28,.14);
  color: var(--warm);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.experience-scroll {
  display: flex;
  gap: .9rem;
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin: 0 -1.4rem;
  padding: .3rem 1.4rem 1.25rem;
  scrollbar-width: none;
}
.experience-scroll::-webkit-scrollbar { display: none; }
.experience-card {
  position: relative;
  flex: 0 0 min(86vw, 320px);
  min-height: 285px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 28px;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(31,159,214,.14), transparent 38%),
    #fff;
  border: 1px solid rgba(14,34,56,.08);
  box-shadow: 0 18px 42px rgba(14, 34, 56, .12);
  transform: translateZ(0);
  transition: transform .22s ease, box-shadow .22s ease;
}
.experience-card:active { transform: scale(.985); }
.experience-card::before {
  content: "";
  position: absolute;
  inset: auto 1.1rem 1.1rem 1.1rem;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), rgba(31,159,214,.65));
  opacity: .72;
}
.experience-card__tag {
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  z-index: 1;
  display: inline-flex;
  padding: .38rem .72rem;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: var(--navy);
  font-size: .73rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.experience-card__icon {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border-radius: 18px;
  background: rgba(248,155,28,.16);
  font-size: 1.45rem;
}
.experience-card h3 {
  margin: 0 0 .55rem;
  font-family: var(--serif);
  font-size: 1.48rem;
  line-height: 1.1;
  color: var(--navy);
}
.experience-card p {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: .96rem;
}
.experience-card--almadies {
  color: #fff;
  background:
    linear-gradient(145deg, rgba(14,34,56,.95), rgba(23,58,87,.90)),
    radial-gradient(circle at 82% 18%, rgba(248,155,28,.40), transparent 30%);
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 22px 55px rgba(14, 34, 56, .24);
}
.experience-card--almadies .experience-card__tag {
  background: rgba(248,155,28,.95);
  color: var(--navy);
}
.experience-card--almadies .experience-card__icon {
  background: rgba(255,255,255,.12);
}
.experience-card--almadies h3,
.experience-card--almadies p { color: #fff; }
.experience-card--sea {
  background:
    linear-gradient(180deg, rgba(8,22,36,.08), rgba(255,255,255,.94) 58%, rgba(255,255,255,.98)),
    url("assets/ile-ngor.webp") center / cover no-repeat;
}
.experience-card--sea h3,
.experience-card--sea p { text-shadow: 0 1px 0 rgba(255,255,255,.5); }

/* ---------------- Mot du maire ---------------- */
.maire { background: var(--off); padding: clamp(2.8rem, 6vw, 4.8rem) 1.4rem; }
.maire__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  gap: 1.6rem;
  align-items: center;
}
.maire__portrait { margin: 0; }
.maire__portrait img {
  width: 158px;
  height: 188px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(14, 34, 56, .18);
}
.maire__quote {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.22rem, 3.2vw, 1.72rem);
  line-height: 1.45;
  color: var(--navy);
}
.maire__name { margin: 0; font-weight: 800; font-size: 1.05rem; color: var(--navy); }
.maire__role { margin: .15rem 0 0; color: var(--ink); font-size: .92rem; }

/* ---------------- Contact ---------------- */
.contact { background: #fff; }
.contact__inner {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
.contact-card {
  margin: 0;
  padding: 1.35rem;
  border-radius: 22px;
  background: var(--navy);
  color: #fff;
  font-style: normal;
  display: grid;
  gap: .65rem;
  box-shadow: 0 20px 45px rgba(14, 34, 56, .16);
}
.contact-card a,
.contact-card span {
  color: #fff;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-card a:hover { color: var(--gold); }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--navy);
  color: #cdd9e4;
  text-align: center;
  padding: 2.2rem 1.4rem;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: .7rem;
}
.footer__brand .brand__logo { width: 36px; height: 36px; }
.footer__contact { margin: 0 0 .4rem; font-size: .92rem; overflow-wrap: anywhere; }
.footer__note { margin: 0; font-size: .8rem; color: var(--sky); }


@media (max-width: 680px) {
  .site-header {
    padding: .78rem .95rem;
    gap: .65rem;
  }

  .brand__logo {
    width: 38px;
    height: 38px;
  }

  .brand__name {
    font-size: .94rem;
  }

  .brand__sub {
    font-size: .68rem;
  }

  .burger {
    width: 40px;
    height: 40px;
    padding: 0 7px;
    flex: 0 0 auto;
  }

  .hero {
    min-height: 88svh;
    background-position: center 18%;
  }

  .hero__inner {
    padding: 2.4rem 1rem 2rem;
  }

  .hero__lead {
    max-width: 32ch;
    font-size: .98rem;
  }

  .section,
  .maire,
  .site-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .intro-band .info-card {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .experience-scroll {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .experience-card {
    flex-basis: min(86vw, 310px);
    min-height: 292px;
    padding: 1.15rem;
  }

  .maire__portrait img {
    width: min(100%, 180px);
    height: auto;
    aspect-ratio: 158 / 188;
  }
}

@media (max-width: 520px) {
  .section__heading--with-note {
    display: block;
  }
  .swipe-note {
    margin-top: .85rem;
  }
  .experience-card {
    flex-basis: 84vw;
    min-height: 276px;
  }
}

/* ---------------- Desktop ---------------- */
@media (min-width: 820px) {
  .site-header { padding: 1rem 2.5rem; }
  .burger { display: none; }

  .nav {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 1.45rem;
    padding: 0;
    background: transparent;
    border: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav a { border-bottom: 0; padding: 0; font-size: .95rem; }
  .nav__cta { margin-top: 0; padding: .62rem 1.2rem !important; }

  .hero__inner { padding: 4.4rem 2.5rem; }

  .hero__actions {
    flex-direction: row;
    align-items: center;
    max-width: none;
  }

  .btn {
    width: auto;
  }

  .intro-band {
    grid-template-columns: repeat(3, 1fr);
  }
  .info-card {
    padding: 1.35rem 2rem;
    border-top: 0;
    border-left: 1px solid rgba(255,255,255,.10);
  }
  .info-card:first-child { border-left: 0; }

  .split { grid-template-columns: minmax(0, 1.05fr) minmax(310px, .7fr); gap: 3.3rem; }
  .section__heading { margin-bottom: 2.3rem; }
  .experience-scroll {
    display: grid;
    grid-template-columns: 1.12fr repeat(2, 1fr);
    gap: 1.1rem;
    overflow: visible;
    margin: 0;
    padding: .3rem 0 0;
  }
  .experience-card {
    min-height: 310px;
    flex: initial;
  }
  .experience-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 58px rgba(14, 34, 56, .16);
  }
  .experience-card--almadies {
    grid-row: span 2;
    min-height: 100%;
  }
  .swipe-note { display: none; }

  .maire__inner {
    grid-template-columns: auto 1fr;
    gap: 2.8rem;
    padding: 0 1.1rem;
  }
  .maire__portrait img { width: 196px; height: 238px; }

  .contact__inner { grid-template-columns: minmax(0, 1fr) 410px; gap: 3rem; }
}

@media (min-width: 1180px) {
  .hero { background-position: center 23%; }
}

/* ---------------- Accessibilité ---------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
