/* ============================================================
   L'ERABLE - Thème Drupal 10/11
   Chambre d'hôte en Bretagne Sud
   Palette : bleus marins, verts côtiers, sables chauds
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Lato:wght@300;400;700&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --color-mer:       #2c5f7a;   /* bleu marin profond */
  --color-mer-light: #4a8fa8;   /* bleu ciel breton */
  --color-mer-pale:  #d6eaf2;   /* ciel pâle */
  --color-sable:     #c8a96e;   /* sable doré */
  --color-sable-pale:#f5ede0;   /* crème chaud */
  --color-herbe:     #4a7c59;   /* vert côtier */
  --color-pierre:    #5a5550;   /* granit breton */
  --color-pierre-pale:#e8e4df;  /* pierre claire */
  --color-blanc:     #ffffff;
  --color-text:      #2a2420;

  --font-titre:  'Playfair Display', Georgia, serif;
  --font-corps:  'Lato', 'Helvetica Neue', sans-serif;

  --shadow-doux: 0 2px 12px rgba(44,95,122,.12);
  --shadow-card: 0 4px 24px rgba(44,95,122,.16);

  --radius:      6px;
  --radius-lg:   12px;

  --transition:  0.25s ease;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-corps);
  color: var(--color-text);
  background: var(--color-blanc);
  line-height: 1.7;
  margin: 0;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--color-mer);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-sable); }

/* ── Typographie ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-titre);
  line-height: 1.25;
  margin-top: 0;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 600; }

p { margin-top: 0; margin-bottom: 1rem; }

.text-mer      { color: var(--color-mer); }
.text-sable    { color: var(--color-sable); }
.text-muted    { color: var(--color-pierre); }

/* ── Boutons ────────────────────────────────────────────────── */
.btn,
a.btn,
button.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  font-family: var(--font-corps);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}

.btn-primaire {
  background: var(--color-mer);
  color: var(--color-blanc);
  border-color: var(--color-mer);
}
.btn-primaire:hover {
  background: var(--color-mer-light);
  border-color: var(--color-mer-light);
  color: var(--color-blanc);
}

.btn-secondaire {
  background: transparent;
  color: var(--color-mer);
  border-color: var(--color-mer);
}
.btn-secondaire:hover {
  background: var(--color-mer);
  color: var(--color-blanc);
}

.btn-sable {
  background: var(--color-sable);
  color: var(--color-blanc);
  border-color: var(--color-sable);
}
.btn-sable:hover {
  background: #b8924c;
  border-color: #b8924c;
  color: var(--color-blanc);
}

/* ── Séparateur décoratif ───────────────────────────────────── */
.separateur {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem auto;
  width: fit-content;
}
.separateur::before,
.separateur::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--color-sable);
}
.separateur-ancre {
  color: var(--color-sable);
  font-size: 1.2rem;
}

/* ── Utilitaires ────────────────────────────────────────────── */
.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;
}
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

/* Cacher le branding Drupal flottant */
#block-lerable-site-branding {
  display: none !important;
}

/* Nom du site dans la nav */
.nav-principale::before {
  content: "L'Erable";
  font-family: var(--font-titre);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-blanc);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.nav-principale nav {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── SLIDER HEADER ─────────────────────────────────────────── */
.slider-hero {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
}

.slider-hero .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.slider-hero .slide.active { opacity: 1; }

.slider-hero .slide:nth-child(1) { background-image: url('/sites/default/files/banner/doelan.jpg'); }
.slider-hero .slide:nth-child(2) { background-image: url('/sites/default/files/banner/photo-mouettes.jpg'); }
.slider-hero .slide:nth-child(3) { background-image: url('/sites/default/files/banner/photo-cotes.jpg'); }
.slider-hero .slide:nth-child(4) { background-image: url('/sites/default/files/banner/huitres.jpg'); }

.slider-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26,56,72,.35) 0%, rgba(26,56,72,.55) 100%);
  z-index: 1;
}

.slider-hero-texte {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 2rem;
}

.slider-hero-texte h2 {
  font-family: var(--font-titre);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
  margin-bottom: 1rem;
}

.slider-hero-texte p {
  font-size: 1.1rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
  max-width: 600px;
}

/* Cacher le titre dupliqué sous le slider */
.layout-main h1 { display: none; }

/* Aligner L'Erable et le menu sur la même ligne */
.nav-principale {
  display: flex;
  align-items: center;
}

.nav-principale::before {
  flex-shrink: 0;
}

/* Titre visible sur les pages internes seulement */
.layout-main h1 { display: block; }
.page-accueil .layout-main h1 { display: none; }

/* Cacher le h1 sur la page d'accueil */
.path-frontpage .layout-main h1 { display: none; }

/* ── Slider header retouché ─────────────────────────────────── */
.slider-hero {
  height: 380px !important;
}

.slider-hero .slide {
  transition: opacity 2s ease !important;
}

.slider-hero::after {
  background: linear-gradient(
    to bottom,
    rgba(26,56,72,.5) 0%,
    rgba(26,56,72,.65) 60%,
    rgba(26,56,72,.85) 100%
  ) !important;
}

.slider-hero-texte h2 {
  font-size: clamp(1.4rem, 3vw, 2.2rem) !important;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
}

.slider-hero-texte p {
  font-size: 0.95rem !important;
  opacity: 0.9;
}

/* Contenu centré avec marges */
.layout-main .field--name-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.layout-main .field--name-body > * {
  max-width: 100%;
}

/* Réduire la taille des blocs dans le body */
.layout-main .field--name-body div[style*="grid"] {
  max-width: 900px;
  margin: 2rem auto;
}
