/* ============================================================
   Ordination Jean-Théophane Crépin — feuille de style
   ============================================================ */

:root {
    --navy:        #0d2c5f;
    --navy-dark:   #081e44;
    --navy-soft:   #ecf0f9;
    --gold:        #f0b840;
    --gold-dark:   #d99a1f;
    --pink:        #8b2845;
    --pink-dark:   #6b1d35;
    --ink:         #1a1f36;
    --ink-soft:    #4a5168;
    --bg:          #fafbff;
    --white:       #ffffff;
    --line:        #e3e7f1;
    --shadow-sm:   0 2px 6px rgba(13, 44, 95, .06);
    --shadow-md:   0 10px 30px -10px rgba(13, 44, 95, .18);
    --shadow-lg:   0 25px 60px -20px rgba(13, 44, 95, .25);
    --radius:      14px;
    --radius-lg:   22px;
    --container:   1140px;
    --header-h:    72px;
    --t:           cubic-bezier(.22, 1, .36, 1);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a  { color: var(--navy); text-decoration: none; transition: color .2s var(--t); }
a:hover { color: var(--pink); }
h1, h2, h3 {
    color: var(--navy);
    font-family: 'Cinzel', 'Inter', Georgia, serif;
    font-weight: 500;
    letter-spacing: .015em;
    margin: 0 0 .4em;
}
p  { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- BOUTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center; justify-content: center;
    gap: .5em;
    padding: 14px 28px;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .01em;
    cursor: pointer;
    transition: transform .25s var(--t), box-shadow .25s var(--t), background .25s var(--t);
    box-shadow: var(--shadow-sm);
    text-align: center;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn--accent { background: var(--gold); color: var(--ink); }
.btn--accent:hover { background: var(--gold-dark); color: var(--white); }
.btn--pink   { background: var(--pink); color: var(--white); }
.btn--pink:hover { background: var(--pink-dark); color: var(--white); }
.btn--lg { padding: 16px 36px; font-size: 16px; }

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.site-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: rgba(255,255,255,.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    z-index: 100;
    transition: background .3s var(--t), border-color .3s var(--t), box-shadow .3s var(--t);
}
.site-header.is-scrolled {
    background: rgba(255,255,255,.96);
    border-bottom-color: var(--line);
    box-shadow: var(--shadow-sm);
}
.nav { display: flex; align-items: center; justify-content: center; height: 100%; position: relative; }
.nav__list {
    display: flex; gap: 8px;
    list-style: none; margin: 0; padding: 0;
}
.nav__link {
    display: inline-block;
    padding: 8px 14px;
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 500;
    border-radius: 999px;
    transition: color .2s var(--t), background .2s var(--t);
}
.nav__link:hover, .nav__link.is-active { color: var(--navy); background: var(--navy-soft); }
.nav__toggle {
    display: none;
    background: transparent; border: 0;
    width: 40px; height: 40px;
    padding: 8px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column; justify-content: space-between; align-items: center;
}
.nav__toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--navy); border-radius: 2px;
    transition: transform .25s var(--t), opacity .25s var(--t);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--header-h) + 40px) 0 80px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    overflow: hidden;
    background:
        radial-gradient(900px 500px at 85% 12%, rgba(240, 184, 64, .12), transparent 65%),
        radial-gradient(700px 450px at 12% 92%, rgba(139, 40, 69, .07), transparent 70%),
        radial-gradient(1000px 600px at 50% 110%, rgba(13, 44, 95, .10), transparent 65%),
        linear-gradient(180deg, #fbfcfe 0%, #eef2f8 100%);
}
.hero__inner { position: relative; z-index: 2; max-width: 820px; }

/* ---------- Animation : tramage de croix qui se déforment au curseur ---------- */
.hero__bg {
    position: absolute; inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.hero__cross {
    position: absolute;
    width: 10px;
    height: 10px;
    color: #6b85ad;
    opacity: .13;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    transition: transform .45s cubic-bezier(.22, 1, .36, 1),
                opacity   .35s cubic-bezier(.22, 1, .36, 1);
    will-change: transform, opacity;
    pointer-events: none;
}
.hero__cross svg { display: block; width: 100%; height: 100%; }

.hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: .25em;
    font-size: 12px;
    font-weight: 600;
    color: var(--pink);
    margin-bottom: 24px;
}
.hero__title {
    font-size: clamp(32px, 6vw, 72px);
    line-height: 1.15;
    color: var(--navy);
    font-weight: 500;
    margin: 0 0 28px;
    letter-spacing: .01em;
    text-transform: none;
}
.hero__title-line {
    display: block;
    white-space: nowrap;
}
.hero__title-accent {
    color: var(--navy-dark);
    font-weight: 500;
}
.hero__lead {
    max-width: 620px; margin: 0 auto 40px;
    font-size: 17px; color: var(--ink-soft);
}
.hero__ctas {
    display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
}

.hero__scroll {
    position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
    width: 28px; height: 46px; border: 2px solid var(--navy);
    border-radius: 16px;
    opacity: .5;
}
.hero__scroll span {
    position: absolute; top: 8px; left: 50%;
    width: 3px; height: 8px;
    background: var(--navy); border-radius: 2px;
    transform: translateX(-50%);
}

/* ============================================================
   GALERIE
   ============================================================ */
.gallery {
    padding: 60px 0 40px;
    background: var(--bg);
}
.gallery__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.gallery__item {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    overflow: hidden;
    height: 360px;
    background: var(--navy-soft);
    box-shadow: var(--shadow-sm);
    transition: transform .35s var(--t), box-shadow .35s var(--t);
    cursor: zoom-in;
    display: block;
    width: 100%;
}
.gallery__item:focus-visible {
    outline: 3px solid var(--pink);
    outline-offset: 3px;
}
.gallery__item img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 25%;
    transition: transform .8s var(--t);
    cursor: zoom-in;
}
.gallery__item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gallery__item:hover img { transform: scale(1.04); }

/* ============================================================
   INFORMATIONS
   ============================================================ */
.info { padding: 60px 0 80px; }
.info__grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}
.info-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--line);
    display: flex; flex-direction: column;
}
.info-card__title {
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--navy-soft);
    white-space: nowrap;
    letter-spacing: .01em;
}
.info-card__body { flex: 1; display: flex; flex-direction: column; }
.info-card__date { font-size: 18px; font-weight: 600; color: var(--navy); margin-bottom: 18px; }
.info-card__addr { color: var(--ink-soft); font-size: 15px; margin-bottom: 18px; }
.info-card__addr strong { color: var(--ink); display: block; margin-bottom: 4px; font-weight: 600; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
    display: flex; gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    font-size: 14.5px;
}
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline__time {
    flex: 0 0 64px;
    color: var(--pink);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.map {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--navy-soft);
    box-shadow: inset 0 0 0 1px var(--line);
}
.map iframe { width: 100%; height: 100%; border: 0; }
.map__link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 14px; font-weight: 500;
    color: var(--pink); align-self: flex-start;
    margin-top: auto;
}
.map__link::after { content: '→'; transition: transform .25s var(--t); }
.map__link:hover::after { transform: translateX(4px); }

/* ============================================================
   SECTION HEAD
   ============================================================ */
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(34px, 4.5vw, 46px); margin-bottom: 14px; font-weight: 500; }
.section-head p { color: var(--ink-soft); font-size: 16px; }
.section-head--light h2 { color: var(--white); }
.section-head--light p { color: rgba(255,255,255,.85); }

/* ============================================================
   PRÉSENCE (fond bleu)
   ============================================================ */
.presence {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}
.presence::before {
    content:'';
    position: absolute; inset: 0;
    background:
        radial-gradient(600px 300px at 90% 10%, rgba(240,184,64,.08), transparent 70%),
        radial-gradient(500px 280px at 10% 90%, rgba(139,40,69,.08), transparent 70%);
    pointer-events: none;
}
.presence .container { position: relative; z-index: 1; }
.presence .card-form { max-width: 760px; margin: 0 auto; }

/* ============================================================
   HÉBERGEMENTS
   ============================================================ */
.hebergements { padding: 80px 0; background: var(--bg); }
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.form__title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--navy-soft);
}

/* ============================================================
   FORMULAIRES
   ============================================================ */
.card-form {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--line);
}
.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.form__row + .form__row,
.form > * + * { margin-top: 14px; }

.field {
    display: flex; flex-direction: column;
    gap: 6px;
}
.field > span {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-soft);
}
.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    color: var(--ink);
    background: var(--white);
    transition: border-color .2s var(--t), box-shadow .2s var(--t);
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: 0;
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(13, 44, 95, .12);
}

.form__group {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
    margin: 0;
}
.form__group legend {
    font-size: 13.5px; font-weight: 600; color: var(--ink);
    padding: 0 8px;
}
.checks {
    display: flex; flex-wrap: wrap; gap: 10px 18px;
    margin-top: 6px;
}
.check {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 14.5px; color: var(--ink);
    cursor: pointer;
}
.check input {
    appearance: none;
    width: 18px; height: 18px;
    border: 1.5px solid var(--line);
    border-radius: 5px;
    background: var(--white);
    display: grid; place-items: center;
    transition: all .15s var(--t);
}
.check input:checked {
    background: var(--navy);
    border-color: var(--navy);
}
.check input:checked::before {
    content: '';
    width: 10px; height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
}

.form__actions {
    margin-top: 22px;
    display: flex; justify-content: flex-end;
}

/* Honeypot caché */
.hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important; height: 1px !important;
    overflow: hidden !important;
}

/* ============================================================
   CADEAU
   ============================================================ */
.cadeau {
    padding: 90px 0;
    background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 100%);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cadeau::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(700px 300px at 50% -20%, rgba(240,184,64,.15), transparent 60%);
    pointer-events: none;
}
.cadeau__inner { position: relative; z-index: 1; max-width: 640px; }
.cadeau h2 { color: var(--white); font-size: clamp(34px, 4.5vw, 46px); margin-bottom: 14px; font-weight: 500; }
.cadeau p { color: rgba(255,255,255,.85); font-size: 16px; }
.cadeau__hint { font-size: 13px; color: rgba(255,255,255,.55); margin-top: 14px; }

/* ============================================================
   BANDEAU PARALLAXE — CATHÉDRALE
   ============================================================ */
.parallax {
    position: relative;
    height: clamp(340px, 55vh, 540px);
    background-image: url('../img/cathedrale.jpg');
    background-size: cover;
    background-position: center 40%;
    background-repeat: no-repeat;
    background-attachment: scroll;
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}
.parallax::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg,
        rgba(8, 30, 68, .55) 0%,
        rgba(8, 30, 68, .75) 100%);
}
.parallax__inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
    padding: 0 28px;
}
.parallax__quote {
    font-family: 'Cinzel', 'Inter', Georgia, serif;
    font-size: clamp(20px, 2.6vw, 30px);
    line-height: 1.45;
    color: #fff;
    margin: 0 0 16px;
    letter-spacing: .02em;
    font-weight: 500;
}
.parallax__ref {
    color: rgba(255, 255, 255, .75);
    font-size: 12px;
    letter-spacing: .28em;
    text-transform: uppercase;
    margin: 0;
}

/* Parallax fixed uniquement sur desktop (iOS gère mal background-attachment: fixed) */
@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
    .parallax { background-attachment: fixed; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: #06163a;
    color: rgba(255,255,255,.65);
    padding: 40px 0 32px;
    text-align: center;
    font-size: 14px;
}
.footer__inner p { margin: 0 0 6px; line-height: 1.5; }
.footer__inner p span { color: rgba(255,255,255,.45); font-style: italic; }
.footer__contact { margin-top: 14px !important; }
.footer__contact a { color: var(--gold); }
.footer__contact a:hover { color: #fff; }
.footer__credits { margin-top: 18px !important; color: rgba(255,255,255,.4); font-size: 12.5px; }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
    position: fixed; bottom: 24px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 14px 22px;
    border-radius: 999px;
    font-size: 14px; font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    opacity: 0;
    animation: toastIn .4s var(--t) forwards, toastOut .4s var(--t) forwards 5s;
    max-width: calc(100vw - 32px);
}
.toast--success { background: #146a3a; color: #fff; }
.toast--error   { background: #b3261e; color: #fff; }
@keyframes toastIn  { to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-50%) translateY(20px); pointer-events: none; } }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(6, 16, 44, .92);
    display: flex; align-items: center; justify-content: center;
    z-index: 300;
    opacity: 0;
    transition: opacity .25s var(--t);
    padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

.lightbox__figure {
    margin: 0;
    max-width: 92vw;
    max-height: 88vh;
    display: flex; align-items: center; justify-content: center;
}
.lightbox__figure img {
    max-width: 100%;
    max-height: 88vh;
    width: auto; height: auto;
    border-radius: 6px;
    box-shadow: 0 30px 80px rgba(0,0,0,.5);
    user-select: none;
}

.lightbox__close,
.lightbox__nav {
    position: absolute;
    background: rgba(255,255,255,.10);
    color: #fff;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s var(--t), transform .2s var(--t);
    -webkit-tap-highlight-color: transparent;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255,255,255,.22); }
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.lightbox__close {
    top: 18px; right: 18px;
    width: 44px; height: 44px;
    font-size: 28px;
    line-height: 1;
}
.lightbox__nav {
    top: 50%;
    width: 52px; height: 52px;
    font-size: 32px;
    line-height: 1;
    transform: translateY(-50%);
}
.lightbox__nav:hover { transform: translateY(-50%) scale(1.05); }
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }

@media (max-width: 600px) {
    .lightbox__nav { width: 42px; height: 42px; font-size: 26px; }
    .lightbox__nav--prev { left: 8px; }
    .lightbox__nav--next { right: 8px; }
    .lightbox__close { width: 40px; height: 40px; font-size: 24px; top: 12px; right: 12px; }
}

/* Empêche le scroll du body quand la lightbox est ouverte */
body.lb-open { overflow: hidden; }

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--t), transform .8s var(--t); }
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
    .info__grid { grid-template-columns: 1fr; gap: 18px; }
    .form-grid  { grid-template-columns: 1fr; }
    .gallery__grid { grid-template-columns: repeat(2, 1fr); }
    .gallery__item { height: 320px; }
}

@media (max-width: 720px) {
    :root { --header-h: 64px; }

    .nav__toggle { display: flex; }
    .nav__list {
        position: fixed;
        top: var(--header-h); left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: 12px 16px 20px;
        box-shadow: var(--shadow-md);
        border-top: 1px solid var(--line);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s var(--t), transform .25s var(--t);
    }
    .nav__list.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
    .nav__link {
        display: block;
        padding: 14px 12px;
        font-size: 16px;
        border-radius: 10px;
    }

    .hero { padding: calc(var(--header-h) + 24px) 0 60px; }
    .hero__title { font-size: clamp(36px, 9vw, 56px); }
    .hero__lead { font-size: 16px; }
    .hero__ctas { flex-direction: column; align-items: stretch; padding: 0 16px; }
    .hero__ctas .btn { width: 100%; }
    .hero__scroll { display: none; }

    .card-form { padding: 22px; }
    .form__row { grid-template-columns: 1fr; }
    .form__actions { justify-content: stretch; }
    .form__actions .btn { width: 100%; }

    .info-card { padding: 24px; }
    .presence, .hebergements, .cadeau { padding: 60px 0; }
    .gallery { padding: 40px 0 24px; }
}

@media (max-width: 480px) {
    .container { padding: 0 18px; }
    .gallery__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .gallery__item { height: 240px; }
    .hero__eyebrow { font-size: 11px; }
    .toast { left: 16px; right: 16px; transform: translateY(20px); }
    @keyframes toastIn  { to { opacity: 1; transform: translateY(0); } }
    @keyframes toastOut { to { opacity: 0; transform: translateY(20px); } }
}

/* Réduire les animations si l'utilisateur le demande */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
