:root {
  --blue: #0b5fff;
  --blue-dark: #0846c2;
  --blue-soft: #eaf1ff;
  --ink: #12203a;
  --muted: #55627a;
  --line: #e1e7f2;
  --bg: #ffffff;
  --bg-alt: #f5f8fd;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(18, 32, 58, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

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

.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.container--narrow { width: min(760px, 100% - 2rem); }
.center { text-align: center; margin-top: 2rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff;
  padding: .5rem 1rem; border-radius: 8px; z-index: 100;
}
.skip:focus { left: 8px; }

/* Boutons */
.btn {
  display: inline-block; background: var(--blue); color: #fff; text-decoration: none;
  font-weight: 600; padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid var(--blue);
  font-size: 1rem; font-family: inherit; cursor: pointer;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--blue); }
.btn--ghost:hover { background: var(--blue-soft); color: var(--blue-dark); }
.btn--small { padding: .5rem 1.1rem; font-size: .95rem; }
.btn--full { width: 100%; }
.link { font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* En-tête */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.logo { display: flex; align-items: center; }
.logo img { display: block; height: 36px; width: auto; }

.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--blue); }

.menu-btn { display: none; background: none; border: 0; padding: .75rem; cursor: pointer; }
.menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after {
  display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s;
}
.menu-btn__bars { position: relative; }
.menu-btn__bars::before, .menu-btn__bars::after { content: ""; position: absolute; left: 0; }
.menu-btn__bars::before { top: -8px; }
.menu-btn__bars::after { top: 8px; }
.menu-btn[aria-expanded="true"] .menu-btn__bars { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-btn__bars::before { top: 0; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars::after { top: 0; transform: rotate(-45deg); }

/* Accueil : scène de Narbonne (cathédrale Saint-Just-et-Saint-Pasteur et palais des Archevêques).
   Pour une vraie photo : déposez-la dans images/cathedrale.jpg, elle s'affiche automatiquement. */
.hero {
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background: linear-gradient(180deg, #0c1836 0%, #1a2b57 45%, #4a3d62 75%, #b5634a 100%);
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(7rem, 16vw, 13rem);
}
.hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
/* Le décor garde toujours la hauteur de l'accueil (donc il n'est jamais coupé en haut), calé à droite.
   Sur un écran très large, la ville se prolonge vers la gauche. */
.hero__scene { position: absolute; top: 0; bottom: 0; right: 0; left: auto; height: 100%; width: auto; aspect-ratio: 1440 / 700; max-width: none; overflow: visible; z-index: -2; }
.hero__photo { background: url("images/cathedrale.jpg") center / cover no-repeat; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(8, 15, 34, .82) 0%, rgba(8, 15, 34, .45) 55%, rgba(8, 15, 34, 0) 85%);
}
/* Fondu du bas de l'image vers la section suivante (au-dessus du voile sombre) */
.hero::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; z-index: 0;
  height: clamp(8rem, 18vw, 13rem);
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .08) 20%, rgba(255, 255, 255, .3) 42%,
    rgba(255, 255, 255, .62) 65%, rgba(255, 255, 255, .9) 85%, #fff 100%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }
.hero__text { max-width: 640px; }
.tag {
  display: inline-block; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25);
  color: #ffd9a3; font-weight: 600; font-size: .9rem; padding: .3rem .9rem; border-radius: 999px;
}
.hero h1 { text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.hero h1 span { color: #ffb454; }
.lead { font-size: 1.2rem; color: var(--muted); }
.hero .lead { color: #dbe3f5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0; }
.btn--sun { background: #ffb454; border-color: #ffb454; color: #1a1205; }
.btn--sun:hover { background: #ffc477; border-color: #ffc477; }
.btn--light { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn--light:hover { background: rgba(255, 255, 255, .14); border-color: #fff; }
.checks { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; color: #c3cde2; font-size: .98rem; }
.checks li::before { content: "✔"; color: #ffb454; margin-right: .45rem; font-weight: 700; }

/* Sections */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 2.75rem; }
.section__head p { color: var(--muted); font-size: 1.1rem; margin: 0; }

/* Services */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card__icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--blue-soft); border-radius: 14px; margin-bottom: 1rem;
}
.card__icon svg { width: 26px; height: 26px; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card p { color: var(--muted); }
.card ul { list-style: none; border-top: 1px solid var(--line); padding-top: 1rem; font-size: .98rem; }
.card li { padding-left: 1.4rem; position: relative; margin-bottom: .5rem; }
.card li::before { content: "✔"; position: absolute; left: 0; color: var(--blue); font-weight: 700; }

/* Étapes */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: s; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.steps__n {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 700; margin-bottom: .9rem;
}
.steps p { color: var(--muted); margin: 0; }

/* À propos */
.about { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; }
.values { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.values li { border-left: 4px solid var(--blue); padding: .25rem 0 .25rem 1rem; }
.values p { color: var(--muted); margin: 0; }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: .75rem; }
.faq summary {
  cursor: pointer; font-weight: 600; padding: 1rem 1.25rem; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--blue); line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 1.25rem 1.1rem; margin: 0; color: var(--muted); }

/* Contact */
.contact { background: var(--ink); color: #fff; }
.contact .lead { color: #c3cde2; }
.contact a { color: #9bbcff; }
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact__list { list-style: none; margin-top: 1.5rem; }
.contact__list li { margin-bottom: .5rem; }
.form { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 1.75rem; display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; padding: .75rem .9rem; border: 1.5px solid #cdd6e6;
  border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.form .invalid { border-color: #d92d20; }
.form__note { margin: 0; font-size: .95rem; color: var(--muted); min-height: 1.4em; }
.form__note.error { color: #d92d20; }
.form__note.ok { color: #0f7a3d; font-weight: 600; }
.form__legal { margin: 0; font-size: .85rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* Pied de page */
.footer { background: #0c1730; color: #aab6cf; padding: 1.75rem 0; font-size: .95rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.footer p { margin: 0; }
.footer__logo { display: block; }
.footer__logo img { display: block; height: 24px; width: auto; }
.footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer a { color: #d6def0; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* Tablette et mobile */
@media (max-width: 900px) {
  .about, .contact__inner { grid-template-columns: 1fr; gap: 2.25rem; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: .5rem 1rem 1rem;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: .85rem .25rem; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: .75rem; text-align: center; }
}

@media (max-width: 560px) {
  .steps, .values { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; text-align: center; }
  .hero { padding-bottom: 17rem; }
  .hero__scene { top: auto; bottom: 0; height: 330px; }
  .hero::after { background: linear-gradient(180deg, rgba(8, 15, 34, .55) 0%, rgba(8, 15, 34, .25) 60%, rgba(8, 15, 34, 0) 100%); }
}

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

/* Intro : zoom arrière depuis un vitrail de la cathédrale (voir script.js) */
#intro { display: none; }
html.intro #intro {
  display: block; position: fixed; inset: 0; z-index: 1000; background: #0a1429; cursor: pointer;
  animation: nwFailsafe .01s linear 7s forwards;   /* sécurité : se masque seul si le script ne tourne pas */
}
@keyframes nwFailsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }
#intro-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* fin intro */

/* Exemples de réalisations : carrousel (alimenté par /webadmin/) */
.section--dark { background: #0c1836; color: #fff; overflow: hidden; }
.section--dark .section__head p { color: #c3cde2; }
.carousel {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.carousel__track { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: .5rem 0 1rem; width: max-content; }
.carousel:not(.is-marquee):not(.is-measuring) .carousel__track { width: auto; justify-content: center; flex-wrap: wrap; padding-inline: 1rem; }
.carousel.is-measuring .carousel__track { width: max-content; flex-wrap: nowrap; }
.carousel.is-marquee .carousel__track { animation: nwMarquee var(--dur, 40s) linear infinite; }
.carousel.is-marquee:hover .carousel__track, .carousel.is-marquee:focus-within .carousel__track { animation-play-state: paused; }
@keyframes nwMarquee { to { transform: translateX(calc(-50% - .75rem)); } }
.card-ex { flex: none; width: min(78vw, 320px); }
.card-ex a {
  display: block; height: 100%; background: #fff; color: var(--ink); text-decoration: none; border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .2s, box-shadow .2s;
}
.card-ex a:hover, .card-ex a:focus-visible { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.card-ex img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; object-position: top; background: #e9eef8; }
.card-ex__ph { display: grid; place-content: center; gap: .35rem; text-align: center; aspect-ratio: 8 / 5; padding: 1rem; color: #fff; background: linear-gradient(180deg, #0c1836, #1a2b57 60%, #4a3d62); }
.card-ex__ph b { font-size: 1.35rem; line-height: 1.2; overflow-wrap: anywhere; }
.card-ex__ph i { font-style: normal; color: #ffb454; font-size: .95rem; overflow-wrap: anywhere; }
.card-ex__body { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 1.1rem 1.1rem; }
.card-ex__name { font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.card-ex__host { font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.card-ex__arrow { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--blue); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) {
  .carousel.is-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .carousel.is-marquee .carousel__track { animation: none; }
  .carousel__dup { display: none; }
}
/* fin exemples */
