/* --- Variables & Reset --- */
:root {
    --primary: #195062; /* Bleu Océan */
    --secondary: #d6b98c; /* Sable doré / Bois */
    --accent: #E8F1F5; /* Bleu très pâle */
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --white: #ffffff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: #FAFAFA;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    margin-bottom: 1rem;
}


a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- Utilitaires --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* padding-top/bottom séparés : la forme courte "80px 0" écrasait le padding
   latéral de .container sur les sections qui cumulent les deux classes */
.section-padding { padding-top: 80px; padding-bottom: 80px; }
.text-center { text-align: center; }
.bg-light { background-color: var(--white); }
.bg-blue { background-color: var(--primary); color: var(--white); }
.mt-2 { margin-top: 2rem; }

/* --- Boutons --- */
.btn-primary, .btn-secondary, .btn-nav {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #b08d55;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(197, 160, 101, 0.4);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* --- Navigation --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--secondary); }

.btn-nav {
    background-color: var(--primary);
    color: var(--white);
    padding: 8px 20px;
}

/* --- Hero Section --- */
header {
    height: 100vh;
    background-image: url('img/hero.jpg'); /* Mettre une belle photo ici */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--white);
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.5));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

/* --- Details Grid --- */
.intro-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.environment-tags {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.environment-tags span {
    background: var(--accent);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.features-box {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 5px solid var(--secondary);
}

.features-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.features-list i { color: var(--secondary); width: 25px; }

/* --- Cards (Couchage) --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.card:hover { transform: translateY(-5px); }

.card-header {
    background: var(--primary);
    color: var(--white);
    padding: 15px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.card-body { padding: 25px; }
.card-body ul li { margin-bottom: 8px; color: var(--text-light); border-bottom: 1px solid #eee; padding-bottom: 5px;}

/* --- Gallery Grid (20 Photos) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 40px;
}

.gallery-item {
    height: 250px;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img { transform: scale(1.1); }

/* --- Calendar --- */
.calendar-wrapper {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    color: var(--text-dark);
    max-width: 600px;
    margin: 40px auto 0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header button {
    background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--primary);
}

.calendar-grid {
    display: grid;
    /* minmax(0, 1fr) et non 1fr : sinon la largeur minimale d'une case
       (padding + chiffre) empêche les colonnes de se réduire et le
       calendrier déborde sur les petits écrans */
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
    text-align: center;
}

.day {
    padding: 10px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.9rem;
}

.day.booked { background-color: #ffcccb; color: #c0392b; }
.day.available { background-color: #d5f5e3; color: #27ae60; }
.legend-item { margin: 0 10px; font-size: 0.9rem; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
.dot.free { background: #27ae60; }
.dot.taken { background: #c0392b; }

/* --- Contact & Forms --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.info-item {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-body);
    margin-bottom: 8px;
}

textarea { resize: vertical; margin-bottom: 20px; }

/* --- Modal --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    width: 90%;
    max-width: 800px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 2rem;
    cursor: pointer;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.modal-grid h4 { color: var(--primary); margin-bottom: 5px; }

/* --- Footer --- */
footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.footer-links a { color: var(--text-light); font-size: 0.9rem; margin: 0 10px;}

/* --- Bouton burger --- */
.burger {
    display: none;
    cursor: pointer;
    padding: 10px;
    margin: -10px;
    background: none;
    border: none;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.burger div {
    width: 26px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--primary);
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

/* Croix quand le menu est ouvert */
.burger.open .line1 { transform: translateY(8px) rotate(45deg); }
.burger.open .line2 { opacity: 0; }
.burger.open .line3 { transform: translateY(-8px) rotate(-45deg); }

/* --- Lightbox (Images en grand) --- */
#lightbox {
    position: fixed;
    z-index: 3000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

#lightbox.active { display: flex; }

#lightbox img {
    max-width: 90%;
    max-height: 80%;
    border: 3px solid var(--white);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 4px;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- Amélioration Section Disponibilités --- */
#availability {
    background-color: #f0f4f7; /* Gris-bleu très clair au lieu du bleu foncé */
    color: var(--text-dark);
}

#availability h2 {
    color: var(--primary) !important; /* Titre foncé pour le contraste */
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.calendar-wrapper {
    border: 1px solid #e1e8ed;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.calendar-grid {
    gap: 8px;
    padding: 10px;
}

.day {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 8px; /* Plus arrondi */
    transition: transform 0.2s;
    background: var(--white);
    border: 1px solid #eee;
}

.day:hover { transform: scale(1.1); z-index: 2; }

.day.booked {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
    text-decoration: line-through;
}

.day.available {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.calendar-legend {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
}

/* --- Section Livre d'Or --- */
.reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
    margin-top: 30px;
}

.review-card {
    background: var(--white); /* Fond blanc pour la tuile */
    padding: 30px;
    border-radius: var(--radius); /* Coins arrondis */
    box-shadow: var(--shadow); /* Ombre pour l'effet de relief */
    border-top: 4px solid var(--secondary); /* Rappel de la couleur sable */
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.review-card:hover {
    transform: translateY(-5px); /* Petit effet de lévitation au survol */
}

.review-card .stars {
    color: #f1c40f; /* Couleur or pour les étoiles */
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.review-card p {
    font-style: italic;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.review-card .author {
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--primary);
    font-size: 0.9rem;
    text-align: right;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* --- Style du formulaire d'avis --- */
.review-form-wrapper {
    background: var(--accent); /* Fond bleu très pâle pour détacher le formulaire */
    padding: 40px;
    border-radius: var(--radius);
    max-width: 800px;
    margin: 0 auto;
}
/* =====================================================================
   CALENDRIER — en-tête des jours, jours passés, sélection
   ===================================================================== */

.calendar-grid .day-name {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    padding: 6px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    aspect-ratio: auto;
}

.day.empty {
    background: none;
    border: none;
    pointer-events: none;
}

.day.empty:hover { transform: none; }

.day.past {
    background-color: #f7f7f7;
    color: #c4c4c4;
    border: 1px solid #f0f0f0;
    cursor: default;
}

.day.past:hover { transform: none; }

.day.is-today {
    box-shadow: 0 0 0 2px var(--secondary);
}

.calendar-header button.disabled,
.calendar-header button:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.calendar-header button:not(:disabled):hover {
    color: var(--secondary);
}

.calendar-header #monthYear {
    margin: 0;
    font-size: 1.3rem;
    color: var(--primary);
    text-transform: capitalize;
}

.calendar-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 15px;
}

.date-warning {
    display: none;
    background: #ffebee;
    color: #c62828;
    border-left: 3px solid #c62828;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* =====================================================================
   ESPACE PROPRIÉTAIRE (admin.html)
   ===================================================================== */

.admin-body { background: #eef2f5; }

/* --- Écran de connexion --- */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(160deg, var(--primary), #0d2c38);
}

.admin-login-box {
    background: var(--white);
    padding: 45px 40px;
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.admin-login-box h1 { font-size: 1.5rem; margin: 18px 0 5px; color: var(--primary); }
.admin-login-box > p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 25px; }

.admin-login-box input[type="password"] {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #dde3e8;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    margin-bottom: 15px;
}

.admin-login-box input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
}

.login-error { color: #c62828; font-size: 0.85rem; min-height: 20px; margin-top: 12px; }

/* --- Structure --- */
.admin-header {
    background: var(--white);
    border-bottom: 1px solid #e1e8ed;
    padding: 14px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-header-left { display: flex; align-items: center; gap: 12px; }
.admin-header-left strong { display: block; font-family: var(--font-heading); color: var(--primary); }
.admin-header-left span { font-size: 0.8rem; color: var(--text-light); }
.admin-header-right { display: flex; gap: 10px; }

.btn-ghost {
    background: none;
    border: 1px solid #dde3e8;
    color: var(--text-dark);
    padding: 9px 16px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost.danger:hover { border-color: #c62828; color: #c62828; }

.admin-main { max-width: 1200px; margin: 0 auto; padding: 30px 20px 60px; }

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 25px;
    align-items: start;
}

.admin-side { display: flex; flex-direction: column; gap: 25px; }

.admin-card {
    background: var(--white);
    border: 1px solid #e1e8ed;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.admin-card h2 {
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-hint { font-size: 0.85rem; color: var(--text-light); margin-bottom: 18px; line-height: 1.5; }
.admin-hint code { background: #f0f4f7; padding: 2px 6px; border-radius: 3px; font-size: 0.8rem; }

.badge {
    background: var(--primary);
    color: var(--white);
    font-size: 0.75rem;
    font-family: var(--font-body);
    padding: 2px 9px;
    border-radius: 20px;
}

/* --- Calendrier admin --- */
.admin-calendar { max-width: 100%; margin: 0; padding: 0; box-shadow: none; border: none; }
.admin-calendar .calendar-grid { padding: 0; }
.admin-calendar .day.clickable { cursor: pointer; }
.admin-calendar .day.clickable:hover { transform: scale(1.08); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.admin-calendar .day.booked { text-decoration: none; }

/* --- Champs --- */
.admin-field { margin-bottom: 14px; }
.admin-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-field input[type="date"] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #dde3e8;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.admin-field input[type="date"]:focus { outline: none; border-color: var(--primary); }

.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.admin-actions .btn-primary,
.admin-actions .btn-secondary { padding: 11px 20px; font-size: 0.85rem; }

.admin-msg { font-size: 0.85rem; margin-top: 12px; min-height: 18px; line-height: 1.5; }
.admin-msg.ok { color: #2e7d32; }
.admin-msg.error { color: #c62828; }
.admin-msg.warn { color: #b26a00; }

/* --- Liste des périodes --- */
.period-list { margin-top: 15px; max-height: 340px; overflow-y: auto; }

.period-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #eef1f4;
    border-left: 3px solid var(--secondary);
    border-radius: 6px;
    margin-bottom: 10px;
    background: #fcfdfe;
}

.period-dates { font-size: 0.9rem; line-height: 1.45; }
.period-nights {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 3px;
}

.period-buttons { display: flex; gap: 6px; flex-shrink: 0; }

.icon-btn {
    background: none;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s ease;
}

.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn.danger:hover { border-color: #c62828; color: #c62828; background: #ffebee; }

.admin-empty { font-size: 0.9rem; color: var(--text-light); font-style: italic; padding: 10px 0; }

.publish-card { border-left: 3px solid var(--secondary); }

@media (max-width: 900px) {
    /* minmax(0,1fr) : sans ça la colonne prend la largeur mini de son contenu
       (les longs libellés de boutons) et dépasse l'écran */
    .admin-grid { grid-template-columns: minmax(0, 1fr); }
    .admin-side, .admin-card { min-width: 0; }
    .admin-actions .btn-primary,
    .admin-actions .btn-secondary,
    .admin-actions .btn-ghost { min-width: 0; }
    .admin-header { padding: 12px 16px; }
    .admin-main { padding: 20px 14px 40px; }
}

/* Boutons de navigation du calendrier : taille garantie même si l'icône
   Font Awesome n'est pas chargée */
.calendar-header button {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.calendar-header button:not(:disabled):hover { background: var(--accent); }

/* Évite que l'en-tête collant masque l'élément visé lors d'un défilement */
.admin-body { scroll-padding-top: 90px; }

/* =====================================================================
   ERGONOMIE MOBILE
   ===================================================================== */

/* Aucun débordement horizontal (le menu hors-écran élargissait la page
   et forçait le navigateur à dézoomer tout le site) */
html, body { overflow-x: hidden; max-width: 100%; }

/* Les ancres ne doivent pas atterrir sous la barre de navigation fixe */
html { scroll-padding-top: 90px; }

/* Les effets de survol n'ont pas de sens au doigt : ils restaient "collés"
   après un appui sur mobile */
@media (hover: none) {
    .card:hover,
    .review-card:hover,
    .btn-primary:hover,
    .day:hover,
    .gallery-item:hover img { transform: none; box-shadow: none; }
}

/* Zone de contact confortable sur tous les liens/boutons tactiles */
a, button, .day, .gallery-item { -webkit-tap-highlight-color: rgba(25, 80, 98, 0.12); }

/* ---------- Tablette et moins ---------- */
@media (max-width: 900px) {
    .map-section iframe { height: 320px; }
}

/* ---------- Mobile (≤ 768px) ---------- */
@media (max-width: 768px) {

    /* --- Navigation --- */
    /* z-index : le burger doit rester au-dessus du panneau pour servir
       de bouton "fermer" (croix) */
    .burger { display: block; position: relative; z-index: 1001; }

    /* backdrop-filter crée un bloc conteneur : le menu en position fixed se
       retrouverait enfermé dans la hauteur de la barre au lieu de couvrir
       l'écran. On le désactive sur mobile (le fond est déjà quasi opaque). */
    .navbar { padding: 0.7rem 4%; gap: 10px; backdrop-filter: none; }

    .logo { font-size: 1rem; line-height: 1.25; }
    .logo img { width: 32px; height: 32px; margin-right: 7px !important; }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(320px, 82%);
        background-color: var(--white);
        box-shadow: -8px 0 30px rgba(0,0,0,0.15);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 90px 0 30px;
        transform: translateX(105%);
        transition: transform 0.35s ease;
        overflow-y: auto;
        z-index: 999;
    }

    .nav-links.nav-active { transform: translateX(0); }

    .nav-links li { width: 100%; }

    .nav-links a {
        display: block;
        padding: 16px 26px;
        font-size: 1.05rem;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-links .btn-nav {
        margin: 22px 26px 0;
        text-align: center;
        border-radius: 50px;
        border-bottom: none;
        padding: 15px 20px;
    }

    /* Voile sombre derrière le menu ouvert */
    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 998;
    }

    .nav-overlay.active { opacity: 1; pointer-events: auto; }

    body.menu-open { overflow: hidden; }

    /* --- Hero --- */
    header {
        /* background-attachment: fixed est cassé sur iOS (image étirée/figée) */
        background-attachment: scroll;
        height: 100svh;
        min-height: 520px;
    }

    .hero-content { padding: 20px 24px; }
    .hero-content h1 { font-size: clamp(1.75rem, 7.5vw, 2.3rem); line-height: 1.25; }
    .hero-content p { font-size: 1.05rem; }

    /* --- Rythme général --- */
    .section-padding { padding-top: 55px; padding-bottom: 55px; }
    .container { padding: 0 18px; }

    h2 { font-size: 1.6rem; }
    #availability h2 { font-size: 1.7rem; margin-bottom: 25px; }

    /* --- Le bien --- */
    .intro-grid, .contact-wrapper { grid-template-columns: 1fr; gap: 2rem; }
    .features-box { padding: 24px 22px; }
    .environment-tags { gap: 10px; }

    /* --- Galerie : 2 colonnes carrées plutôt qu'une seule bande --- */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 25px;
    }

    .gallery-item { height: auto; aspect-ratio: 1 / 1; }

    /* --- Calendrier --- */
    .calendar-wrapper { padding: 18px 14px; margin-top: 25px; }
    .calendar-grid { gap: 5px; padding: 0; }
    .calendar-header { margin-bottom: 14px; }
    .calendar-header #monthYear { font-size: 1.1rem; }
    .calendar-header button { width: 42px; height: 42px; }
    .day { font-size: 0.85rem; border-radius: 6px; }
    .calendar-grid .day-name { font-size: 0.65rem; padding: 2px 0; }
    .calendar-legend { flex-wrap: wrap; gap: 8px; }
    .calendar-note { font-size: 0.8rem; }

    /* --- Livre d'or & formulaires --- */
    .review-form-wrapper { padding: 25px 20px; }
    .review-card { padding: 22px; }
    .contact-wrapper { padding: 25px 20px; }
    .contact-form .form-row { grid-template-columns: 1fr; gap: 0; margin-bottom: 0; }
    .info-item { font-size: 1rem; gap: 12px; }

    /* 16px minimum : en dessous, iOS zoome automatiquement sur le champ actif */
    input, select, textarea {
        font-size: 16px;
        padding: 14px 13px;
        margin-bottom: 14px;
    }

    .date-group { margin-bottom: 6px; }
    .date-group label { display: block; margin-bottom: 4px; font-size: 0.85rem; font-weight: 600; }

    .btn-primary, .btn-secondary, .btn-nav { padding: 14px 26px; }
    .btn-primary.full-width { width: 100%; }

    /* --- Modal équipements --- */
    .modal-content { padding: 30px 20px; width: 92%; max-height: 85vh; }
    .modal-grid { grid-template-columns: 1fr; gap: 18px; }
    .close-modal {
        top: 6px; right: 10px;
        width: 44px; height: 44px;
        display: flex; align-items: center; justify-content: center;
    }

    /* --- Pied de page --- */
    footer { padding: 30px 0; }
    footer p { font-size: 0.85rem; }
    .footer-links { margin-top: 8px; }
    .footer-links a { display: inline-block; padding: 10px 6px; }

    /* --- Lightbox --- */
    #lightbox img { max-width: 94%; max-height: 78%; }
}

/* ---------- Petits écrans (≤ 380px) ---------- */
@media (max-width: 380px) {
    .logo { font-size: 0.9rem; }
    .logo img { width: 28px; height: 28px; }
    .calendar-wrapper { padding: 14px 8px; }
    .day { font-size: 0.8rem; }
    .calendar-grid { gap: 4px; }
    .hero-content h1 { font-size: 1.6rem; }
}

/* ---------- Espace propriétaire sur mobile ---------- */
@media (max-width: 768px) {
    .admin-header { padding: 12px 14px; }
    .admin-header-left strong { font-size: 0.95rem; }
    .admin-card { padding: 20px 16px; }
    .admin-calendar .day { font-size: 0.9rem; }
    /* flex-basis 140px : deux boutons côte à côte s'ils tiennent,
       empilés sinon — sans jamais déborder de l'écran */
    .admin-actions .btn-primary,
    .admin-actions .btn-secondary,
    .admin-actions .btn-ghost { flex: 1 1 140px; padding: 14px 12px; justify-content: center; }
    .admin-field input[type="date"] { font-size: 16px; padding: 14px; }
    .admin-login-box { padding: 35px 25px; }
    .period-list { max-height: none; }
    .icon-btn { width: 42px; height: 42px; }
}

/* --- Lightbox : bouton de fermeture --- */
.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: var(--white);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Carte : verrouillée tant qu'on n'a pas tapé dessus --- */
.map-section { position: relative; }

.map-section.map-locked::after {
    content: "Toucher la carte pour l'activer";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 14px;
    font-size: 0.8rem;
    font-family: var(--font-body);
    color: var(--white);
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    background: transparent;
    cursor: pointer;
}

.map-section.map-locked iframe { pointer-events: none; }

@media (hover: hover) {
    /* Sur ordinateur la carte reste utilisable directement */
    .map-section.map-locked iframe { pointer-events: auto; }
    .map-section.map-locked::after { display: none; }
}

/* La barre de navigation s'efface derrière la photo plein écran */
body.lightbox-open .navbar { opacity: 0; visibility: hidden; }

@media (max-width: 768px) {
    /* Les cases ne doivent jamais imposer leur largeur mini à la grille */
    .day { padding: 6px 2px; min-width: 0; }
    .admin-calendar .calendar-wrapper,
    .admin-card .calendar-wrapper { padding: 0; }
}

/* =====================================================================
   FORMULAIRES : captcha, messages, anti-spam
   ===================================================================== */

/* Libellés lisibles par les lecteurs d'écran uniquement */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Champ piège : caché aux humains, visible pour les robots.
   display:none est évité, certains bots l'ignorent — on le sort de l'écran. */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: auto;
    width: 1px; height: 1px;
    overflow: hidden;
}

.captcha-box { margin: 6px 0 18px; min-height: 65px; }

.form-msg {
    display: none;
    margin-top: 14px;
    padding: 12px 15px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    line-height: 1.5;
}

.form-msg.ok {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 3px solid #2e7d32;
}

.form-msg.error {
    display: block;
    background: #ffebee;
    color: #c62828;
    border-left: 3px solid #c62828;
}

.form-legal {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 12px;
    line-height: 1.45;
}

/* =====================================================================
   ESPACE PROPRIÉTAIRE : demandes de réservation
   ===================================================================== */

.request-list { margin-top: 12px; }

.request-item {
    border: 1px solid #eef1f4;
    border-left: 3px solid #dde3e8;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #fcfdfe;
}

.request-item.is-new {
    border-left-color: var(--secondary);
    background: #fffdf8;
}

.request-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.request-head strong { font-family: var(--font-heading); color: var(--primary); }

.tag {
    background: var(--secondary);
    color: var(--white);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 20px;
}

.request-meta { font-size: 0.85rem; color: var(--text-light); margin-bottom: 6px; }
.request-contact { font-size: 0.85rem; margin-bottom: 8px; word-break: break-word; }
.request-contact a { color: var(--primary); text-decoration: underline; }

.request-message {
    font-size: 0.88rem;
    background: var(--white);
    border: 1px solid #eef1f4;
    border-radius: 5px;
    padding: 10px 12px;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

.request-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.request-actions .btn-ghost { font-size: 0.78rem; padding: 7px 13px; }

/* Deux champs sur l'écran de connexion admin */
.admin-login-box input[type="email"] {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #dde3e8;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    margin-bottom: 12px;
}

.admin-login-box input[type="email"]:focus { outline: none; border-color: var(--primary); }

/* =====================================================================
   CARROUSEL DU LIVRE D'OR
   Défilement natif avec accroche : le glissement du doigt fonctionne
   sans JavaScript, les flèches ne sont qu'un raccourci.
   ===================================================================== */

.carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

/* Remplace la grille par une piste horizontale */
.carousel .reviews-container {
    display: flex;
    grid-template-columns: none;
    gap: 25px;
    margin: 0;
    flex: 1;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 6px 4px 18px;
    /* Barre de défilement masquée : les flèches et les points suffisent */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel .reviews-container::-webkit-scrollbar { display: none; }

.carousel .reviews-container:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 4px;
    border-radius: var(--radius);
}

.carousel .review-card {
    flex: 0 0 clamp(260px, 31%, 380px);
    scroll-snap-align: start;
    margin: 0;
}

.carousel-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #e1e8ed;
    background: var(--white);
    color: var(--primary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.carousel-btn:hover:not(:disabled) { background: var(--primary); color: var(--white); }
.carousel-btn:disabled { opacity: 0.3; cursor: default; }
.carousel-btn[hidden] { display: none; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 6px 0 40px;
}

.carousel-dots[hidden] { display: none; }

.carousel-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: #cfd8dd;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dot.active { background: var(--secondary); transform: scale(1.3); }

@media (max-width: 768px) {
    /* Une carte pleine largeur, on fait défiler au doigt */
    .carousel { gap: 6px; }
    .carousel .review-card { flex: 0 0 86%; }
    .carousel .reviews-container { gap: 14px; }
    .carousel-btn { display: none; }
    .carousel-dots { margin-bottom: 30px; }
}

/* =====================================================================
   ESPACE PROPRIÉTAIRE : modération des avis
   ===================================================================== */

.review-mod {
    border: 1px solid #eef1f4;
    border-left: 3px solid #dde3e8;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #fcfdfe;
}

.review-mod.pending { border-left-color: var(--secondary); background: #fffdf8; }
.review-mod.published { border-left-color: #2e7d32; }

.review-mod-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.review-mod-head strong { font-family: var(--font-heading); color: var(--primary); }
.review-mod-head .stars { color: #f1c40f; font-size: 0.9rem; margin: 0; }

.review-mod-date { font-size: 0.78rem; color: var(--text-light); }

.review-mod p {
    font-size: 0.88rem;
    background: var(--white);
    border: 1px solid #eef1f4;
    border-radius: 5px;
    padding: 10px 12px;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-break: break-word;
    font-style: italic;
}

.review-mod-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.review-mod-actions .btn-ghost { font-size: 0.78rem; padding: 7px 13px; }
.btn-ghost.success:hover { border-color: #2e7d32; color: #2e7d32; background: #e8f5e9; }

/* =====================================================================
   RESPIRATION ENTRE LE LIVRE D'OR ET LE FORMULAIRE
   ===================================================================== */

.review-form-wrapper { margin-top: 60px; }

@media (max-width: 768px) {
    .review-form-wrapper { margin-top: 40px; }
}

/* =====================================================================
   CURSEUR DE NOTATION PAR ÉTOILES
   Un input range transparent posé sur des étoiles : on conserve le
   glissement natif (doigt et souris), le clavier et l'accessibilité,
   sans réimplémenter un composant maison.
   ===================================================================== */

.star-rating { margin-bottom: 18px; }

.star-rating > label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.star-rating-control {
    position: relative;
    display: inline-block;
    line-height: 1;
    /* Le curseur déborde légèrement pour que la pastille reste saisissable
       aux extrémités */
    padding: 4px 0;
}

.star-rating-stars {
    position: relative;
    display: inline-block;
    font-size: 2.1rem;
    line-height: 1;
    letter-spacing: 6px;
    white-space: nowrap;
    user-select: none;
}

.star-rating-empty { color: #dfe4e8; }

.star-rating-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    color: #f1c40f;
    transition: width 0.12s ease-out;
    pointer-events: none;
}

/* Le curseur lui-même : invisible, mais toujours actif */
.star-rating-control input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: none;
    touch-action: pan-y;
}

.star-rating-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 44px;
    height: 44px;
}

.star-rating-control input[type="range"]::-moz-range-thumb {
    width: 44px;
    height: 44px;
    border: none;
}

/* Anneau de mise au point visible pour la navigation au clavier */
.star-rating-control input[type="range"]:focus-visible + .star-rating-stars,
.star-rating-control:focus-within .star-rating-stars {
    outline: 2px solid var(--secondary);
    outline-offset: 6px;
    border-radius: 4px;
}

.star-rating-value {
    display: block;
    margin-top: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

@media (max-width: 768px) {
    .star-rating-stars { font-size: 2.4rem; letter-spacing: 8px; }
}

/* Livre d'or vide : la section reste, prête pour les premiers avis */
.reviews-empty {
    text-align: center;
    color: var(--text-light);
    font-size: 1.05rem;
    margin: 35px auto 0;
    max-width: 560px;
    padding: 30px 25px;
    background: var(--white);
    border: 1px dashed #dfe4e8;
    border-radius: var(--radius);
    line-height: 1.7;
}

.reviews-empty span { font-size: 0.9rem; }
.reviews-empty[hidden] { display: none; }

/* =====================================================================
   SECTION « LE GUILVINEC ET SES ENVIRONS »
   ===================================================================== */

.environs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    margin-top: 40px;
}

.environ-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 26px;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--secondary);
}

.environ-card h3 {
    font-size: 1.15rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.environ-card h3 i { color: var(--secondary); font-size: 1.1rem; flex-shrink: 0; }

.environ-card p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-dark);
}

/* Tableau des distances */
.distances { margin-top: 4px; }

.distances li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px dashed #e6eaed;
    font-size: 0.92rem;
}

.distances li:last-child { border-bottom: none; }
.distances span { color: var(--text-light); }
.distances strong { color: var(--primary); white-space: nowrap; }

/* =====================================================================
   QUESTIONS FRÉQUENTES
   Balises <details> natives : ouverture/fermeture sans JavaScript,
   accessibles au clavier et lisibles par les moteurs de recherche.
   ===================================================================== */

.faq-list {
    max-width: 820px;
    margin: 40px auto 0;
}

.faq-item {
    background: var(--white);
    border: 1px solid #e8edf0;
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.faq-item[open] { box-shadow: var(--shadow); border-color: #dfe6ea; }

.faq-item summary {
    cursor: pointer;
    padding: 18px 52px 18px 22px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary);
    position: relative;
    list-style: none;
    user-select: none;
}

/* Masque la flèche par défaut des navigateurs */
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ''; }

/* Chevron maison, qui pivote à l'ouverture */
.faq-item summary::after {
    content: '';
    position: absolute;
    right: 22px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--secondary);
    border-bottom: 2px solid var(--secondary);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.25s ease;
}

.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }

.faq-item summary:hover { background: #fbfcfd; }

.faq-item summary:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: -3px;
}

.faq-answer {
    padding: 0 22px 20px;
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-dark);
}

.faq-answer p { margin-bottom: 0; }

@media (max-width: 768px) {
    .environs-grid { grid-template-columns: 1fr; gap: 18px; margin-top: 28px; }
    .environ-card { padding: 22px 20px; }
    .environ-card h3 { font-size: 1.05rem; }
    .faq-list { margin-top: 28px; }
    .faq-item summary { padding: 16px 44px 16px 18px; font-size: 0.95rem; }
    .faq-answer { padding: 0 18px 18px; }
}

/* Deux entrées de menu ont été ajoutées (Les Environs, FAQ) : l'espacement
   fixe de 30 px faisait passer la barre sur deux lignes autour de 1280 px.
   Un espacement proportionnel garde tout sur une seule ligne. */
@media (min-width: 769px) {
    .nav-links { gap: clamp(12px, 1.6vw, 28px); }
    .nav-links a { font-size: 0.85rem; }
    .btn-nav { padding: 8px 18px; }
    .logo { font-size: clamp(1rem, 1.35vw, 1.5rem); }
    .logo img { width: 34px; height: 34px; }
}

/* Entre 769 et 1023 px (tablettes en paysage), la barre est encore trop
   serrée pour 8 entrées : on resserre davantage plutôt que de laisser
   le menu passer sur deux lignes. */
@media (min-width: 769px) and (max-width: 1023px) {
    .navbar { padding: 0.8rem 3%; }
    .nav-links { gap: 11px; }
    .nav-links a { font-size: 0.78rem; }
    .btn-nav { padding: 7px 14px; letter-spacing: 0.5px; }
    .logo { font-size: 0.92rem; line-height: 1.2; }
    .logo img { width: 28px; height: 28px; margin-right: 6px !important; }
}
