/* Couleurs reprises du thème Hostinger (index.css) */
:root {
  --background: #ffffff;
  --foreground: #030712;
  --primary: #16a34a;
  --primary-hover: #15803d;
  --primary-soft: rgba(22, 163, 74, 0.1);
  --primary-foreground: #fff1f2;
  --secondary: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --gray-50: #f9fafb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 0.5rem;
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,.25);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
main { flex: 1; overflow-x: clip; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .container { padding: 0 2rem; } }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 2.5rem; padding: 0 1rem; border-radius: calc(var(--radius) - 2px);
  font-size: .875rem; font-weight: 500; border: 1px solid transparent;
  background: var(--primary); color: var(--primary-foreground);
  transition: background-color .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn:hover { background: var(--primary-hover); }
.btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-lg { height: 2.75rem; padding: 0 2rem; }
.btn-block { width: 100%; }
.btn-outline { background: var(--background); color: var(--foreground); border-color: var(--border); }
.btn-outline:hover { background: var(--secondary); }
.btn-ghost { background: transparent; color: var(--gray-800); }
.btn-ghost:hover { background: var(--secondary); color: var(--primary); }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid rgba(226,232,240,.4); }
.header-inner { display: flex; align-items: center; height: 6rem; }
.logo img { height: 3rem; width: auto; }
.header-actions { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.nav-desktop { display: none; align-items: center; gap: 1.5rem; font-size: .875rem; font-weight: 500; }
.nav-desktop a, .nav-mobile a { color: var(--gray-800); transition: color .2s; }
.nav-desktop a:hover, .nav-mobile a:hover, .nav-desktop a.active, .nav-mobile a.active { color: var(--primary); }
.nav-desktop .btn-ghost { font-size: .875rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border: 0; border-radius: calc(var(--radius) - 2px);
  background: transparent; color: var(--gray-800);
}
.icon-btn:hover { background: var(--secondary); }
.menu-toggle .ico-close { display: none; }
.menu-toggle[aria-expanded="true"] .ico-open { display: none; }
.menu-toggle[aria-expanded="true"] .ico-close { display: block; }
.lang { position: relative; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + .25rem); min-width: 8rem; padding: .25rem;
  background: #fff; border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px); box-shadow: var(--shadow-md);
}
.lang-menu button { display: block; width: 100%; text-align: left; padding: .375rem .5rem; border: 0; background: none; border-radius: calc(var(--radius) - 4px); font-size: .875rem; }
.lang-menu button:hover, .lang-menu button.current { background: var(--secondary); }
.nav-mobile {
  position: absolute; top: 100%; left: 0; width: 100%; background: #fff; border-bottom: 1px solid rgba(226,232,240,.4);
  display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 1rem 0;
  animation: slideDown .2s ease-out;
}
.nav-mobile[hidden] { display: none; }
@media (min-width: 768px) {
  .nav-desktop { display: flex; }
  .menu-toggle, .nav-mobile { display: none !important; }
}

/* Animations d'apparition */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: none; } }
@keyframes slideLeft { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: none; } }
@keyframes slideRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: none; } }
.page { animation: fadeIn .5s ease-out; }
.fade-up { animation: fadeUp .6s ease-out both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Accueil */
.hero { position: relative; height: 60vh; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.5); z-index: 1; }
.hero-content { position: relative; z-index: 2; padding: 1rem; animation: fadeUp .8s .3s ease-out both; }
.hero h1 { font-size: 2.25rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.25; margin-bottom: 1rem; text-shadow: 2px 2px 8px rgba(0,0,0,.8); }
.hero p { max-width: 42rem; margin: 0 auto 2rem; font-size: 1.125rem; color: #e5e7eb; text-shadow: 1px 1px 4px rgba(0,0,0,.7); }
@media (min-width: 768px) {
  .hero { height: 70vh; }
  .hero h1 { font-size: 3.75rem; }
  .hero p { font-size: 1.25rem; }
}

.section { padding: 4rem 0; }
@media (min-width: 768px) { .section { padding: 6rem 0; } }
.section-head { text-align: center; margin-bottom: 3rem; }
.section-head h2 { font-size: 1.875rem; font-weight: 700; color: var(--primary); }
.section-head h1 { font-size: 2.25rem; font-weight: 800; color: var(--primary); }
.section-head p { font-size: 1.125rem; color: var(--muted-foreground); margin-top: .5rem; }
@media (min-width: 768px) {
  .section-head h2 { font-size: 2.25rem; }
  .section-head h1 { font-size: 3rem; }
}

/* Cartes parcours */
.grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.card-header { padding: 1.5rem 1.5rem 0; display: flex; flex-direction: column; gap: .375rem; }
.card-title { font-size: 1.5rem; font-weight: 600; line-height: 1.2; letter-spacing: -.025em; }
.card-desc { font-size: .875rem; color: var(--muted-foreground); }
.card-content { padding: 1.5rem; }
.card-footer { padding: 0 1.5rem 1.5rem; }

.course-card {
  overflow: hidden; height: 100%; display: flex; flex-direction: column;
  background: var(--secondary); border-color: rgba(226,232,240,.6);
  transition: all .3s; animation: fadeUp .5s ease-out both;
}
.course-card:hover { border-color: rgba(22,163,74,.8); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.course-card .thumb { position: relative; }
.course-card .thumb img { height: 14rem; width: 100%; object-fit: cover; }
.rating-badge {
  position: absolute; top: .5rem; right: .5rem; display: flex; align-items: center; gap: .375rem;
  padding: .25rem .75rem; border-radius: 999px; font-size: .875rem; font-weight: 600;
  background: rgba(255,255,255,.8); backdrop-filter: blur(4px); color: var(--foreground);
}
.rating-badge svg { color: #facc15; }
.course-card .card-title { font-size: 1.25rem; font-weight: 700; color: var(--foreground); }
.location { display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: var(--muted-foreground); padding-top: .25rem; }
.location svg { flex-shrink: 0; }
.course-card .card-content { flex-grow: 1; }
.course-card .card-content p { font-size: .875rem; color: var(--muted-foreground); }
.course-card .card-content p.tag { font-size: 1rem; font-weight: 600; color: var(--primary); margin-bottom: .5rem; }

/* Filtres */
.page-pad { padding-top: 3rem; padding-bottom: 3rem; }
.filters { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; margin-bottom: 3rem; }
.filter-group { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; }
.filter-group > span { font-weight: 600; }
@media (min-width: 768px) { .filters { flex-direction: row; } }
/* Carte des régions */
.region-map {
  max-width: 40rem; margin: 0 auto 3rem; padding: 1.5rem;
  background: var(--secondary); border: 1px solid var(--border); border-radius: var(--radius);
}
.region-map h2 { text-align: center; font-size: 1.25rem; font-weight: 700; color: var(--primary); margin-bottom: 1rem; }
.region-map > svg { display: block; width: 100%; height: auto; }
.map-tabs { display: flex; justify-content: center; gap: .5rem; margin-bottom: 1rem; }
.region { fill: #e2e8f0; stroke: #fff; stroke-width: 1.2; stroke-linejoin: round; transition: fill .2s; }
.region.has-golf { fill: #86efac; cursor: pointer; }
.region.has-golf:hover, .region.has-golf:focus-visible { fill: #4ade80; outline: none; }
.region.has-golf:focus-visible { stroke: var(--foreground); stroke-width: 2; }
.region.selected, .region.selected:hover { fill: var(--primary); }
.region-badge { pointer-events: none; }
.region-badge circle { fill: var(--primary); stroke: #fff; stroke-width: 2; }
.region-badge text { fill: #fff; font-size: 14px; font-weight: 700; text-anchor: middle; }
.region-badge.selected circle { fill: #fff; stroke: var(--primary); }
.region-badge.selected text { fill: var(--primary); }
.canary-frame { fill: none; stroke: #cbd5e1; stroke-dasharray: 4 4; }
.canary-label { fill: var(--muted-foreground); font-size: 13px; }
.region-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; margin-top: 1rem; min-height: 2.5rem; text-align: center; }
.region-hint { font-size: .875rem; color: var(--muted-foreground); }
.region-current { display: flex; align-items: center; gap: .375rem; color: var(--foreground); }
.region-current svg { color: var(--primary); width: 18px; height: 18px; flex-shrink: 0; }
@media (max-width: 640px) { .region-map { padding: 1rem; margin-bottom: 2rem; } }
/* Téléphone : titre et filtres resserrés pour que la carte entière tienne dans le premier écran */
@media (max-width: 640px) {
  .courses-page.page-pad { padding-top: 1rem; }
  .courses-page .section-head { margin-bottom: .75rem; }
  .courses-page .section-head h1 { font-size: 1.5rem; }
  .courses-page .filters { gap: .5rem; margin-bottom: .75rem; }
  .courses-page .filter-group > span { display: none; }
  .courses-page .filter-group .btn { height: 2rem; padding: 0 .75rem; font-size: .8125rem; }
  .courses-page .region-map { padding: .75rem; }
  .courses-page .region-map h2 { font-size: 1rem; margin-bottom: .5rem; }
  .courses-page .map-tabs { margin-bottom: .5rem; }
  .courses-page .map-tabs .btn { height: 2rem; font-size: .8125rem; }
  .courses-page .region-status { margin-top: .5rem; min-height: 0; }
  .courses-page .region-hint { font-size: .8125rem; }
  /* la carte ne dépasse jamais la hauteur de l'écran */
  .courses-page .region-map > svg { max-height: calc(100svh - 26rem); min-height: 15rem; margin: 0 auto; }
}

.empty { grid-column: 1 / -1; text-align: center; padding: 4rem 0; color: var(--muted-foreground); font-size: 1.125rem; }

/* Fiche parcours */
.back-btn { gap: .4rem; margin-bottom: 1rem; }
.course-hero {
  display: block; position: relative; height: 50vh; border-radius: var(--radius); overflow: hidden;
  margin-bottom: 2rem; box-shadow: var(--shadow-2xl);
}
.course-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0,0,0,.6), transparent 50%, rgba(0,0,0,.2)); transition: background .3s; }
.course-hero:hover::before { background: linear-gradient(to top, rgba(0,0,0,.8), transparent 50%, rgba(0,0,0,.2)); }
.course-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.course-hero:hover img { transform: scale(1.05); }
.course-hero .overlay { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 2rem; color: #fff; }
.course-hero h1 { font-size: 2.25rem; font-weight: 800; line-height: 1.1; text-shadow: 2px 2px 8px rgba(0,0,0,.8); }
.course-hero .location { color: #fff; font-size: 1.125rem; margin-top: .5rem; text-shadow: 1px 1px 4px rgba(0,0,0,.7); }
@media (min-width: 768px) {
  .course-hero { height: 60vh; }
  .course-hero h1 { font-size: 3.75rem; }
}

.detail-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.detail-main, .detail-side { display: flex; flex-direction: column; gap: 2rem; min-width: 0; }
@media (min-width: 1024px) {
  .detail-grid { grid-template-columns: 2fr 1fr; }
}
.detail-grid .card { box-shadow: var(--shadow-lg); }
.detail-grid .card-title { color: var(--primary); font-size: 1.25rem; display: flex; align-items: center; gap: .75rem; }
.detail-grid .card-title.lg { font-size: 1.5rem; }
.about { color: var(--gray-600); display: flex; flex-direction: column; gap: 1rem; }
.about .pre { white-space: pre-line; }
.about .facts { font-weight: 600; color: var(--primary); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; padding-top: 1rem; text-align: center; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: flex; flex-direction: column; align-items: center; padding: .75rem; background: var(--gray-50); border-radius: var(--radius); }
.stat svg { margin-bottom: .25rem; }
.stat strong { font-size: 1.25rem; color: var(--gray-800); }
.stat span { font-size: .875rem; color: var(--gray-500); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery button { position: relative; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); transition: transform .2s; background: none; }
.gallery button:hover { transform: scale(1.05); }
.gallery button:active { transform: scale(.95); }
.gallery button:focus-visible { outline: 2px solid var(--primary); }
.gallery img { width: 100%; height: 8rem; object-fit: cover; }
.gallery .num { position: absolute; bottom: .5rem; left: .5rem; padding: .25rem .5rem; border-radius: .25rem; background: rgba(255,255,255,.95); font-size: .875rem; font-weight: 600; }

.videos { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .videos { grid-template-columns: repeat(2, 1fr); } }
.videos .frame { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.videos iframe { width: 100%; height: 100%; border: 0; }
.videos p { margin-top: .5rem; text-align: center; font-weight: 600; }

.deals { display: flex; flex-direction: column; gap: 1rem; }
.deal { padding: .75rem; background: var(--gray-50); border-radius: var(--radius); }
.deal a { font-weight: 600; color: var(--gray-800); transition: color .2s; }
.deal a:hover { color: var(--primary); text-decoration: underline; }
.deal .type { font-size: .875rem; color: var(--gray-500); }
.deal .desc { font-size: .875rem; color: var(--gray-600); margin-top: .25rem; }
.muted { font-size: .875rem; color: var(--muted-foreground); }

/* Contact */
.contact { max-width: 72rem; }
.contact-head { text-align: center; margin-bottom: 3rem; }
.contact-head h1 { font-size: 2.25rem; font-weight: 800; color: var(--gray-900); letter-spacing: -.025em; animation: slideDown .5s .2s ease-out both; }
.contact-head p { margin: 1rem auto 0; max-width: 42rem; font-size: 1.125rem; color: var(--gray-600); animation: slideDown .5s .4s ease-out both; }
@media (min-width: 640px) { .contact-head h1 { font-size: 3rem; } }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-grid .card { height: 100%; box-shadow: var(--shadow-lg); transition: box-shadow .3s; }
.contact-grid .card:hover { box-shadow: var(--shadow-xl); }
.contact-grid > :first-child { animation: slideLeft .6s .6s ease-out both; }
.contact-grid > :last-child { animation: slideRight .6s .8s ease-out both; }
.contact-grid .card-title { font-size: 1.5rem; font-weight: 700; color: var(--gray-800); }
.contact-item { display: flex; align-items: flex-start; gap: 1rem; color: var(--gray-700); }
.contact-item .ico { flex-shrink: 0; width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); border-radius: var(--radius); }
.contact-item a:hover { color: var(--primary); text-decoration: underline; }
.newsletter p { margin-bottom: 1.5rem; color: var(--gray-600); }
.newsletter label { display: block; font-size: .875rem; font-weight: 500; color: var(--gray-700); margin-bottom: .5rem; }
.newsletter .row { display: flex; gap: .5rem; }
.input {
  flex-grow: 1; min-width: 0; height: 2.5rem; padding: .5rem .75rem; font: inherit; font-size: .875rem;
  border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px); background: #fff;
}
.input:focus { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Pied de page */
.site-footer { background: #fff; border-top: 1px solid rgba(226,232,240,.4); }
.footer-inner { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 2rem; padding-bottom: 2rem; }
.footer-brand { font-size: 1.125rem; font-weight: 700; color: var(--gray-800); }
.footer-text { text-align: center; font-size: .875rem; color: var(--muted-foreground); }
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; }
  .footer-text { text-align: right; }
}

.footer-link { text-decoration: underline; }
.footer-link:hover { color: var(--primary); }

/* Page crédits */
.credits h1 { font-size: 2rem; font-weight: 800; color: var(--primary); margin: 1.5rem 0 1rem; }
.credits > p { color: var(--gray-600); margin-bottom: 1rem; }
.credits ul { padding-left: 1.25rem; font-size: .875rem; color: var(--gray-700); }
.credits li { margin-bottom: .5rem; overflow-wrap: anywhere; }
.credits li a { color: var(--primary); text-decoration: underline; }
.legal h1 { margin-top: 2.5rem; }
.legal h2 { font-size: 1.25rem; font-weight: 700; color: var(--foreground); margin: 1.75rem 0 .5rem; }
.legal p a { color: var(--primary); text-decoration: underline; }
.legal-date { font-size: .875rem; margin-top: 2rem; }

/* Visionneuse photo */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(0,0,0,.8); animation: fadeIn .2s; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 48rem; width: 100%; max-height: 90vh; object-fit: contain; border-radius: var(--radius); }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 999px; background: rgba(255,255,255,.9); font-size: 1.75rem; line-height: 1; }

/* Notification */
.toast {
  position: fixed; bottom: 1rem; right: 1rem; left: 1rem; z-index: 100; max-width: 26rem; margin-left: auto;
  padding: 1rem 1.25rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  animation: fadeUp .3s ease-out;
}
.toast[hidden] { display: none; }
.toast strong { display: block; font-size: .875rem; }
.toast span { display: block; font-size: .875rem; color: var(--muted-foreground); margin-top: .25rem; }
