/* ===== Livret d'accueil St Siffret — thème clair et lumineux ===== */
:root {
    --primary: #2e9e8f;
    --accent: #f4a259;
    --bg: #fbf9f4;
    --surface: #ffffff;
    --text: #2c3339;
    --muted: #6b7680;
    --border: #ece7dd;
    --shadow: 0 6px 24px rgba(44, 51, 57, 0.07);
    --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; line-height: 1.2; }

a { color: var(--primary); }

/* ===== Hero ===== */
.hero {
    background-color: var(--primary);
    background-image:
        linear-gradient(180deg, color-mix(in srgb, var(--primary) 45%, transparent), color-mix(in srgb, var(--primary) 78%, transparent)),
        url('banner.jpg');
    background-size: cover;
    background-position: center 55%;
    background-repeat: no-repeat;
    color: #fff;
    padding: 2.4rem 1.25rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 6px rgba(0,0,0,0.28);
}
.hero-inner { max-width: 720px; margin: 0 auto; position: relative; }
.hero h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 0.4rem 0 0.3rem; color: #fff; }
.hero .tagline { font-size: 1.1rem; opacity: 0.95; margin: 0 0 1rem; font-style: italic; }
.hero .welcome { font-size: 1.02rem; opacity: 0.96; max-width: 600px; margin: 0 auto; }

.lang-switch { display: flex; gap: 0.35rem; justify-content: center; }
.lang-switch a {
    color: #fff; text-decoration: none; font-weight: 700; font-size: 0.85rem;
    padding: 0.25rem 0.7rem; border-radius: 999px; border: 1.5px solid rgba(255,255,255,0.5);
    opacity: 0.75; transition: all 0.2s;
}
.lang-switch a.active, .lang-switch a:hover { background: #fff; color: var(--primary); opacity: 1; }

.times { display: flex; gap: 0.75rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.time-pill {
    background: rgba(255,255,255,0.18); backdrop-filter: blur(4px);
    border-radius: 14px; padding: 0.6rem 1.1rem; display: flex; flex-direction: column;
    align-items: center; min-width: 110px;
}
.time-pill span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.9; }
.time-pill strong { font-size: 1.25rem; font-family: 'Fraunces', serif; }

/* ===== Layout ===== */
.container { max-width: 720px; margin: 0 auto; padding: 0 1.25rem 3rem; }

/* ===== Sommaire ===== */
.toc {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    margin: -1.5rem 0 1.75rem; position: relative;
    background: var(--surface); border-radius: var(--radius);
    padding: 1rem; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.toc a {
    display: inline-flex; align-items: center; gap: 0.4rem;
    text-decoration: none; color: var(--text); font-weight: 600; font-size: 0.9rem;
    background: var(--bg); padding: 0.45rem 0.8rem; border-radius: 999px;
    border: 1px solid var(--border); transition: all 0.15s;
}
.toc a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.toc-icon { font-size: 1rem; }

/* ===== Cartes ===== */
.card {
    background: var(--surface); border-radius: var(--radius);
    padding: 1.6rem 1.5rem; margin-bottom: 1.25rem;
    box-shadow: var(--shadow); border: 1px solid var(--border);
    scroll-margin-top: 1rem;
}
.card h2 {
    font-size: 1.4rem; margin: 0 0 0.9rem; display: flex; align-items: center; gap: 0.6rem;
    color: var(--text);
}
.sec-icon {
    font-size: 1.3rem; background: color-mix(in srgb, var(--primary) 12%, #fff);
    width: 2.4rem; height: 2.4rem; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.content p { margin: 0 0 0.85rem; }
.content p:last-child { margin-bottom: 0; }
.content ul { margin: 0 0 0.85rem; padding-left: 0; list-style: none; }
.content li {
    position: relative; padding-left: 1.6rem; margin-bottom: 0.5rem;
}
.content li::before {
    content: '✓'; position: absolute; left: 0; top: 0;
    color: var(--primary); font-weight: 700;
}

/* Lien « En savoir plus » vers une page détaillée */
.more-link {
    display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 1rem;
    text-decoration: none; font-weight: 700; color: #fff; background: var(--primary);
    padding: 0.55rem 1.1rem; border-radius: 999px; transition: background 0.15s, transform 0.15s;
}
.more-link:hover { background: color-mix(in srgb, var(--primary) 85%, #000); transform: translateY(-1px); }

/* ===== Wifi ===== */
.wifi-card { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, #fff), #fff); }
.wifi-grid { display: grid; gap: 0.9rem; }
.wifi-item { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.wifi-item .label { font-weight: 700; color: var(--muted); min-width: 110px; }
.wifi-item code {
    font-family: 'Nunito Sans', monospace; font-size: 1.15rem; font-weight: 700;
    background: var(--bg); padding: 0.35rem 0.75rem; border-radius: 10px;
    border: 1px solid var(--border); color: var(--primary); letter-spacing: 0.02em;
}
.copy-btn {
    background: var(--primary); color: #fff; border: none; cursor: pointer;
    padding: 0.4rem 0.85rem; border-radius: 10px; font-weight: 700; font-size: 0.85rem;
    font-family: inherit; transition: background 0.15s;
}
.copy-btn:hover { background: color-mix(in srgb, var(--primary) 85%, #000); }
.copy-btn.done { background: var(--accent); }

/* ===== Contacts ===== */
.contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.75rem; }
.contact {
    display: flex; flex-direction: column; text-decoration: none; color: var(--text);
    background: var(--bg); border: 1px solid var(--border); border-radius: 14px;
    padding: 0.85rem 1rem; transition: all 0.15s;
}
.contact:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.contact-name { font-weight: 700; }
.contact-phone { color: var(--primary); font-weight: 700; font-size: 1.1rem; }
.contact-note { color: var(--muted); font-size: 0.85rem; }

/* ===== Adresses ===== */
.cat-title { font-size: 1.05rem; color: var(--muted); margin: 1.2rem 0 0.6rem; }
.cat-title:first-of-type { margin-top: 0.3rem; }
.addresses { display: grid; gap: 0.7rem; }
.address {
    background: var(--bg); border: 1px solid var(--border); border-radius: 14px;
    padding: 0.85rem 1rem; display: flex; flex-direction: column; gap: 0.15rem;
}
.addr-name { font-weight: 700; }
.addr-desc { color: var(--muted); font-size: 0.92rem; }
.addr-map { margin-top: 0.3rem; font-weight: 600; font-size: 0.9rem; text-decoration: none; }

/* ===== Footer ===== */
.site-footer { text-align: center; padding: 2rem 1rem; color: var(--muted); font-size: 0.9rem; }
.footer-link { color: var(--primary); text-decoration: none; font-weight: 600; }
.footer-link:hover { text-decoration: underline; }

/* ===== Page d'accès (mot de passe visiteur) ===== */
.access-body {
    min-height: 100vh; margin: 0; display: flex; align-items: center; justify-content: center;
    padding: 1.25rem;
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(251,249,244,0.86), rgba(251,249,244,0.92)),
        url('access-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
.access-card {
    background: var(--surface); border-radius: 22px; box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    padding: 2.2rem 1.8rem; width: 100%; max-width: 380px; text-align: center;
}
.access-lang { justify-content: center; margin-bottom: 1rem; }
.access-lang a { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, #fff); opacity: 0.75; }
.access-lang a.active, .access-lang a:hover { background: var(--primary); color: #fff; opacity: 1; }
.access-icon {
    font-size: 2rem; width: 3.8rem; height: 3.8rem; margin: 0 auto 0.8rem;
    background: color-mix(in srgb, var(--primary) 12%, #fff); border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
}
.access-card h1 { font-family: 'Fraunces', serif; font-size: 1.6rem; margin: 0 0 0.4rem; color: var(--text); }
.access-intro { color: var(--muted); margin: 0 0 1.3rem; }
.access-card form { display: flex; flex-direction: column; gap: 0.7rem; }
.access-card input[type="password"] {
    padding: 0.75rem 0.9rem; border: 1px solid var(--border); border-radius: 12px;
    font-size: 1.05rem; text-align: center; font-family: inherit;
}
.access-card input[type="password"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.access-btn {
    background: var(--primary); color: #fff; border: none; border-radius: 12px;
    padding: 0.75rem 1rem; font-size: 1.05rem; font-weight: 700; cursor: pointer; font-family: inherit;
}
.access-btn:hover { background: color-mix(in srgb, var(--primary) 85%, #000); }
.access-error {
    background: #fdeaea; border: 1px solid #f2c2c2; color: #a93636;
    border-radius: 10px; padding: 0.6rem 0.9rem; margin-bottom: 0.9rem; font-weight: 600;
}

/* ===== Bouton haut de page ===== */
.back-top {
    position: fixed; bottom: 1.25rem; right: 1.25rem;
    width: 3rem; height: 3rem; border-radius: 50%;
    background: var(--primary); color: #fff; text-decoration: none;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
    box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.back-top.show { opacity: 1; pointer-events: auto; }

@media (max-width: 480px) {
    .card { padding: 1.3rem 1.1rem; }
    .wifi-item .label { min-width: auto; }
}

/* ===== Version GUIDE : grille de cases ===== */
.tiles {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem; margin: 0 0 1.25rem; position: relative;
}
.tile {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 1.5rem 1.4rem; text-decoration: none; color: var(--text);
    display: flex; flex-direction: column; gap: 0.4rem; transition: transform 0.15s, box-shadow 0.15s;
    position: relative; overflow: hidden;
}
.tile::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(44,51,57,0.12); }
.tile-icon {
    font-size: 1.8rem; width: 3.2rem; height: 3.2rem; border-radius: 14px;
    background: color-mix(in srgb, var(--primary) 12%, #fff);
    display: inline-flex; align-items: center; justify-content: center; margin-bottom: 0.3rem;
}
.tile-title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.2rem; }
.tile-summary { color: var(--muted); font-size: 0.92rem; flex: 1; }
.tile-cta { color: var(--primary); font-weight: 700; font-size: 0.9rem; margin-top: 0.3rem; }

/* ===== Page détaillée ===== */
.hero-page { padding-bottom: 2.2rem; }
.page-title-icon {
    font-size: 2.4rem; width: 4.2rem; height: 4.2rem; margin: 1.4rem auto 0.6rem;
    background: rgba(255,255,255,0.2); border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
}
.back-row { margin: 1.25rem 0 1rem; }
.back-link-page {
    display: inline-block; text-decoration: none; font-weight: 700; color: var(--primary);
    background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
    padding: 0.45rem 1rem; box-shadow: var(--shadow);
}
.back-link-page:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.block-text .content p:first-child { margin-top: 0; }

/* ===== Galerie photos ===== */
.gallery { display: grid; gap: 0.8rem; align-items: start; }
.gallery-many { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery-one { grid-template-columns: 1fr; }
.photo { margin: 0; }
.photo img {
    width: 100%; height: auto; display: block; border-radius: 12px;
    border: 1px solid var(--border); background: var(--bg);
}
.gallery-one .photo img { width: auto; max-width: 100%; max-height: 520px; margin: 0 auto; }
.photo figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 0.5rem; text-align: center; }
