:root {
  --c-primary: #0b5d5b;
  --c-accent: #c8892b;
  --c-bg: #faf7f2;
  --c-text: #1d2528;
  --c-muted: #6b7478;
  --c-card: #ffffff;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--c-bg); color: var(--c-text); }
[dir="rtl"] body, body:has(html[dir="rtl"]) { font-family: "Noto Sans Arabic", system-ui, sans-serif; }

.site-header { display: flex; align-items: center; gap: 1.5rem; padding: 1rem 2rem; background: #fff; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 10; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--c-primary); text-decoration: none; }
.logo span { color: var(--c-accent); }
.main-nav { display: flex; gap: 1.2rem; flex: 1; }
.main-nav a { color: var(--c-text); text-decoration: none; }
.header-actions { display: flex; gap: .6rem; align-items: center; }

.btn { border: 0; border-radius: 8px; padding: .7rem 1.2rem; font: inherit; cursor: pointer; }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--c-primary); border: 1px solid var(--c-primary); }
.btn-ghost:disabled { opacity: .5; cursor: not-allowed; }

.hero { background: linear-gradient(rgba(11,93,91,.78), rgba(200,137,43,.55)), url("../images/01-homepage/hero-marrakech.jpg") center/cover no-repeat, #0b5d5b; color: #fff; padding: 4rem 1.5rem 5rem; text-align: center; }
.hero h1 { margin: 0 0 .5rem; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.hero p { margin: 0 0 2rem; opacity: .95; }

.search-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; max-width: 1000px; margin: 0 auto; background: #fff; color: var(--c-text); padding: 1rem; border-radius: var(--radius); box-shadow: var(--shadow); align-items: end; }
.search-form .btn { height: 44px; }
.form-error { color: #ffd6d6; min-height: 1.2em; margin: .6rem 0 0; font-weight: 600; }

.field { display: flex; flex-direction: column; gap: .3rem; text-align: start; }
.field label { font-size: .85rem; color: var(--c-muted); }
.field input, .field select { padding: .6rem; border: 1px solid #d6dbdd; border-radius: 8px; font: inherit; background: #fff; }

main { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }
.filters { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: end; margin-bottom: 1.5rem; }
.filters .field { min-width: 180px; }
.result-count { margin: 0 0 0 auto; color: var(--c-muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; }
.card { background: var(--c-card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: transform .15s; }
.card:hover, .card:focus-visible { transform: translateY(-3px); outline: 2px solid var(--c-accent); }
.card-img { height: 150px; display: grid; place-items: center; font-size: 3rem; background: linear-gradient(135deg, #d9ece9, #f3e2c7); }
.card-body { padding: 1rem; }
.card-body h3 { margin: .4rem 0; font-size: 1.1rem; }
.muted { color: var(--c-muted); margin: .2rem 0; font-size: .9rem; }
.price { font-weight: 700; color: var(--c-primary); margin: .6rem 0 0; }
.price span { font-weight: 400; color: var(--c-muted); font-size: .85rem; }

.badge { display: inline-block; font-size: .75rem; padding: .2rem .5rem; border-radius: 999px; background: #eee; }
.badge-a_verifier { background: #fff1d6; color: #7a4f00; }
.badge-verifie { background: #d8f0e6; color: #0c5a34; }
.badge-partenaire { background: #d9ece9; color: var(--c-primary); }

.detail { background: var(--c-card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-top: 2rem; }
.detail[hidden] { display: none; }
.gallery-placeholder { height: 200px; display: grid; place-items: center; background: #eef2f2; color: var(--c-muted); border-radius: var(--radius); margin: 1rem 0; }
.equip { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; list-style: none; }
.equip li { background: #eef2f2; padding: .3rem .7rem; border-radius: 999px; font-size: .9rem; }

.events { background: var(--c-card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-top: 2rem; }
.events h2 { margin: 1rem 0 .3rem; }
.events-cover { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius); }
.table-wrap { overflow-x: auto; margin-top: 1rem; }
.events-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.events-table th, .events-table td { text-align: start; padding: .6rem .5rem; border-bottom: 1px solid #e3e6e7; vertical-align: top; }
.events-table th { color: var(--c-muted); font-weight: 600; }

.site-footer { text-align: center; padding: 2rem; color: var(--c-muted); border-top: 1px solid #e3e6e7; }

@media (max-width: 720px) {
  .site-header { flex-wrap: wrap; padding: .8rem 1rem; }
  .main-nav { order: 3; width: 100%; justify-content: center; }
  .result-count { margin: 0; width: 100%; }
}

/* Espace client (connexion / inscription) */
.auth-modal{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;z-index:1000;padding:16px}
.auth-modal[hidden]{display:none}
.auth-box{background:#fff;border-radius:12px;max-width:420px;width:100%;padding:28px 24px;position:relative;box-shadow:0 10px 30px rgba(0,0,0,.2)}
.auth-close{position:absolute;top:8px;right:12px;background:none;border:0;font-size:28px;cursor:pointer;line-height:1}
.auth-tabs{display:flex;gap:8px;margin-bottom:16px}
.auth-tabs button{flex:1;padding:10px;border:1px solid #0b5d5b;background:#fff;color:#0b5d5b;border-radius:8px;cursor:pointer;font-weight:600}
.auth-tabs button[aria-selected="true"]{background:#0b5d5b;color:#fff}
.auth-form{display:grid;gap:12px}
.auth-form label{display:grid;gap:4px;font-size:14px}
.auth-form input{padding:10px;border:1px solid #bbb;border-radius:6px;font-size:15px}
.auth-note{font-size:13px;margin-top:14px}

/* Sélection du jour */
.badge-pick{background:#c8892b;color:#fff}

/* Photos officielles : aucune image tierce intégrée sans licence */
.card-img { height: 210px; overflow: hidden; background: #f1eee8; display:flex; align-items:center; justify-content:center; }
.card-img img { width:100%; height:100%; object-fit:cover; display:block; }
.photo-missing { width:100%; height:100%; min-height:150px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; color:#6b7280; background:linear-gradient(135deg,#f5f1e9,#e8e1d5); }
.gallery { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin:16px 0; }
.gallery a { display:block; height:150px; overflow:hidden; border-radius:10px; }
.gallery img { width:100%; height:100%; object-fit:cover; }
.btn-secondary { background:#fff; color:var(--c-primary); border:1px solid var(--c-primary); }

/* Destinations marocaines (accueil) */
.dest-strip { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem 0; }
.dest-strip h2 { margin: 0 0 1rem; font-size: 1.4rem; color: var(--c-primary); }
.dest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.dest-card { display: flex; flex-direction: column; gap: .3rem; text-align: start; padding: 1.2rem; border: 0; border-radius: var(--radius); background: linear-gradient(135deg, #0b5d5b, #c8892b); color: #fff; cursor: pointer; box-shadow: var(--shadow); font: inherit; }
.dest-card:hover, .dest-card:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.dest-name { font-size: 1.3rem; font-weight: 700; }
.dest-desc { font-size: .9rem; opacity: .95; }

/* Illustrations de destination (visuels de maquette, pas des photos d'établissements) */
.dest-card.has-img { position: relative; background-size: cover; background-position: center; color: #fff; }
.dest-card.has-img::before { content: ""; position: absolute; inset: 0; border-radius: var(--radius); background: linear-gradient(rgba(11,93,91,.25), rgba(11,93,91,.85)); }
.dest-card.has-img > span { position: relative; }
.dest-agadir { background-image: url("../images/02-destinations/agadir-beach.jpg"); }
.dest-taghazout { background-image: url("../images/02-destinations/taghazout-surf-village.jpg"); }
.dest-marrakech { background-image: url("../images/02-destinations/marrakech-medina.jpg"); }
.dest-note { display: block; font-size: .72rem; opacity: .85; margin-top: .3rem; }
