/* ============================================================
   CIQ La Bouilladisse — Feuille de style principale
   ============================================================ */

:root {
  --rouge:      #C8151A;
  --rouge-dark: #a01015;
  --jaune:      #F5C400;
  --noir:       #1A1A1A;
  --vert:       #3D6A4A;
  --creme:      #FDF8F0;
  --gris:       #F2EDE4;
  --gris-mid:   #DDD6CE;
  --blanc:      #FFFFFF;
  --brun:       #2A1A0A;
  --texte:      #3A2810;
  --texte-light:#6B5540;
  --ombre:      rgba(26,26,26,0.12);
  --radius:     4px;
  --radius-lg:  8px;
  --font-titre: 'Playfair Display', Georgia, serif;
  --font-body:  'Lato', system-ui, sans-serif;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); color: var(--texte); background: var(--creme); line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rouge); text-decoration: none; transition: color .2s; }
a:hover { color: var(--rouge-dark); }
ul, ol { list-style: none; }

/* ── Typography ──────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-titre); font-weight: 700; line-height: 1.2; color: var(--brun); }
h1 { font-size: clamp(2rem,5vw,3.5rem); }
h2 { font-size: clamp(1.6rem,4vw,2.5rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Container ───────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.container--narrow { max-width: 780px; }
.container--wide   { max-width: 1300px; }

/* ── Boutons ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .75rem 2rem;
  border-radius: var(--radius);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .22s;
  text-decoration: none;
  font-family: var(--font-body);
}
.btn-primary   { background: var(--rouge); color: #fff; border-color: var(--rouge); }
.btn-primary:hover { background: var(--rouge-dark); border-color: var(--rouge-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(200,21,26,.35); }
.btn-outline   { background: transparent; color: var(--rouge); border-color: var(--rouge); }
.btn-outline:hover { background: var(--rouge); color: #fff; }
.btn-white     { background: #fff; color: var(--brun); border-color: #fff; }
.btn-white:hover { background: var(--jaune); border-color: var(--jaune); }
.btn-sm        { padding: .5rem 1.25rem; font-size: .7rem; }
.btn-lg        { padding: 1rem 2.5rem; font-size: .85rem; }

/* ── Navigation ──────────────────────────────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(253,248,240,.96);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--rouge);
  transition: box-shadow .3s;
}
.site-nav.scrolled { box-shadow: 0 4px 24px var(--ombre); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 2rem; max-width: 1300px; margin: 0 auto;
}
.nav-logo { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--brun); }
.nav-logo img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.nav-logo-text .name  { font-family: var(--font-titre); font-size: 1.1rem; font-weight: 700; color: var(--rouge); line-height: 1.1; }
.nav-logo-text .sub   { font-size: .65rem; letter-spacing: .15em; text-transform: uppercase; color: #999; }
.nav-menu { display: flex; gap: 2rem; align-items: center; }
.nav-menu a {
  font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brun); position: relative; padding-bottom: .25rem; text-decoration: none;
  transition: color .2s;
}
.nav-menu a::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--rouge); transform: scaleX(0); transition: transform .25s;
}
.nav-menu a:hover { color: var(--rouge); }
.nav-menu a:hover::after, .nav-menu a.active::after { transform: scaleX(1); }
.nav-menu a.active { color: var(--rouge); }
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav-burger span { display: block; width: 24px; height: 2px; background: var(--brun); margin: 5px 0; transition: all .3s; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  min-height: 100vh; position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.55) saturate(1.15);
  transition: transform 8s ease-out;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(26,26,26,.05) 0%, rgba(26,26,26,.6) 100%);
}
.hero-content { position: relative; z-index: 2; text-align: center; color: #fff; padding: 0 1.5rem; }
.hero-logo { width: 120px; height: 120px; margin: 0 auto 1.5rem; border-radius: 50%; object-fit: cover; border: 4px solid var(--jaune); box-shadow: 0 8px 40px rgba(0,0,0,.45); }
.hero-tag { display: inline-block; font-size: .65rem; letter-spacing: .3em; text-transform: uppercase; border: 1px solid rgba(245,196,0,.6); padding: .45rem 1.25rem; border-radius: 2px; margin-bottom: 1.25rem; color: var(--jaune); }
.hero-title { font-family: var(--font-titre); margin-bottom: 1rem; text-shadow: 0 2px 24px rgba(0,0,0,.4); color: #a01015;}
.hero-title em { font-style: italic; color: var(--jaune); }
.hero-subtitle { font-size: clamp(.9rem,2vw,1.1rem); font-weight: 300; color: rgba(255,255,255,.85); max-width: 540px; margin: 0 auto 2.5rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  color: rgba(255,255,255,.5); font-size: .65rem; letter-spacing: .2em; text-transform: uppercase;
}
.hero-scroll .arrow { width: 18px; height: 18px; border-right: 2px solid rgba(245,196,0,.5); border-bottom: 2px solid rgba(245,196,0,.5); transform: rotate(45deg); animation: bounce 1.6s infinite; }
@keyframes bounce { 0%,100%{transform:rotate(45deg) translateY(0)} 50%{transform:rotate(45deg) translateY(6px)} }

/* ── Sections communes ───────────────────────────────────── */
.section { padding: 5.5rem 0; }
.section--grey  { background: var(--gris); }
.section--white { background: var(--blanc); }
.section--dark  { background: var(--noir); color: #fff; }
.section-label { font-size: .65rem; letter-spacing: .3em; text-transform: uppercase; color: var(--rouge); font-weight: 700; margin-bottom: .6rem; }
.section-title { margin-bottom: 1.1rem; }
.section-title em { font-style: italic; color: var(--rouge); }
.section-lead  { font-size: 1.05rem; font-weight: 300; color: var(--texte-light); line-height: 1.8; max-width: 620px; }
.divider { width: 50px; height: 3px; background: linear-gradient(to right, var(--rouge), var(--jaune)); margin-bottom: 1.75rem; border-radius: 2px; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--blanc); border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px var(--ombre); overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(200,21,26,.15); }
.card-img { height: 200px; object-fit: cover; width: 100%; }
.card-img-placeholder { height: 200px; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: linear-gradient(135deg, var(--rouge) 0%, #8B1A1A 100%); }
.card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1.1rem; margin-bottom: .6rem; line-height: 1.3; }
.card-body p  { font-size: .875rem; color: var(--texte-light); line-height: 1.7; flex: 1; }
.card-meta { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gris); }

/* ── Badge catégorie ─────────────────────────────────────── */
.badge { display: inline-block; font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .25rem .65rem; border-radius: 10px; }
.badge-rouge    { background: #FFF0F0; color: var(--rouge); }
.badge-culture  { background: #F0F0FF; color: #5533BB; }
.badge-sport    { background: #F0FFF0; color: #1A7A2A; }
.badge-env      { background: #F0FBF0; color: #3D6A4A; }
.badge-reunion  { background: #FFF8E0; color: #8B6010; }
.badge-solid    { background: #FFF0F8; color: #993356; }
.badge-info     { background: #E8F0FF; color: #1A5A9A; }

/* ── Grilles ─────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
.grid-2-1 { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }

/* ── Article content (blog) ──────────────────────────────── */
.article-content { line-height: 1.9; }
.article-content h2 { font-size: 1.6rem; margin: 2rem 0 .8rem; }
.article-content h3 { font-size: 1.2rem; margin: 1.5rem 0 .6rem; }
.article-content p  { margin-bottom: 1.2rem; }
.article-content ul, .article-content ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: .4rem; }
.article-content blockquote { border-left: 4px solid var(--rouge); padding: 1rem 1.5rem; background: var(--gris); margin: 1.5rem 0; font-style: italic; }
.article-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.article-content a  { color: var(--rouge); text-decoration: underline; }

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb { display: flex; gap: .5rem; align-items: center; font-size: .8rem; color: var(--texte-light); margin-bottom: 1.5rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--texte-light); }
.breadcrumb a:hover { color: var(--rouge); }
.breadcrumb .sep { color: #ccc; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin: 2.5rem 0; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius);
  font-size: .85rem; font-weight: 700; text-decoration: none;
  border: 1.5px solid var(--gris-mid); color: var(--texte); transition: all .2s;
}
.pagination a:hover  { background: var(--rouge); color: #fff; border-color: var(--rouge); }
.pagination .current { background: var(--rouge); color: #fff; border-color: var(--rouge); }
.pagination .dots    { border: none; color: #aaa; cursor: default; }

/* ── Agenda ──────────────────────────────────────────────── */
.agenda-item { display: flex; gap: 0; border-bottom: 1px solid var(--gris); text-decoration: none; color: inherit; transition: background .18s; }
.agenda-item:hover { background: #FFF8F8; }
.agenda-item:hover .agenda-arrow { opacity: 1; transform: translateX(4px); }
.agenda-date-box { min-width: 72px; padding: 1rem .75rem; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 3px solid var(--gris); flex-shrink: 0; }
.agenda-date-box .day   { font-family: var(--font-titre); font-size: 1.75rem; font-weight: 700; color: var(--rouge); line-height: 1; }
.agenda-date-box .month { font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; color: #999; margin-top: 2px; }
.agenda-body  { padding: 1rem; flex: 1; display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.agenda-info h3 { font-size: 1rem; margin-bottom: .35rem; line-height: 1.3; }
.agenda-meta    { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; font-size: .75rem; color: #888; }
.agenda-meta .sep { color: #ddd; }
.agenda-arrow   { font-size: 1.1rem; color: var(--rouge); opacity: 0; transition: all .2s; flex-shrink: 0; }
.agenda-featured { background: var(--rouge); border-radius: var(--radius-lg); margin-bottom: .75rem; border-bottom: none; }
.agenda-featured:hover { background: var(--rouge-dark); }
.agenda-featured .agenda-date-box { border-right-color: rgba(255,255,255,.2); }
.agenda-featured .agenda-date-box .day   { color: var(--jaune); }
.agenda-featured .agenda-date-box .month { color: rgba(255,255,255,.6); }
.agenda-featured .agenda-info h3 { color: #fff; }
.agenda-featured .agenda-meta { color: rgba(255,255,255,.7); }
.agenda-featured .agenda-arrow { color: var(--jaune); opacity: 1; }

/* ── Formulaires ─────────────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #888; margin-bottom: .4rem; }
.form-control {
  width: 100%; padding: .75rem 1rem; border: 1.5px solid var(--gris-mid);
  border-radius: var(--radius); background: #fff; font-family: var(--font-body);
  font-size: .9rem; color: var(--brun); transition: border-color .2s; outline: none;
}
.form-control:focus { border-color: var(--rouge); }
.form-control.error { border-color: #E53E3E; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-error { font-size: .8rem; color: #E53E3E; margin-top: .3rem; }
.form-help  { font-size: .8rem; color: #aaa; margin-top: .3rem; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ── Flash messages ──────────────────────────────────────── */
.flash { padding: .9rem 1.2rem; border-radius: var(--radius); margin-bottom: 1.2rem; font-size: .9rem; display: flex; align-items: center; gap: .6rem; }
.flash-success { background: #EBF8E6; color: #1E6B27; border-left: 4px solid #2E9E3B; }
.flash-error   { background: #FEE8E8; color: #9B1C1C; border-left: 4px solid #E53E3E; }
.flash-warning { background: #FFFAE6; color: #7A5400; border-left: 4px solid #E8B600; }
.flash-info    { background: #E8F0FF; color: #1A3A6A; border-left: 4px solid #2563EB; }

/* ── Mini-calendrier ─────────────────────────────────────── */
.mini-cal { background: #fff; border-radius: var(--radius-lg); border: 1.5px solid var(--gris); overflow: hidden; }
.mini-cal-header { background: var(--rouge); color: #fff; padding: .8rem 1rem; display: flex; justify-content: space-between; align-items: center; }
.mini-cal-header h3 { font-family: var(--font-titre); font-size: 1rem; margin: 0; }
.mini-cal-nav { background: none; border: none; color: #fff; cursor: pointer; font-size: 1.1rem; padding: 0 .4rem; opacity: .8; }
.mini-cal-nav:hover { opacity: 1; }
.mini-cal-grid { padding: .75rem; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; margin-bottom: 3px; }
.cal-weekdays span { font-size: .6rem; text-align: center; color: #999; letter-spacing: .1em; text-transform: uppercase; padding: .25rem 0; }
.cal-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: .75rem; border-radius: 4px; cursor: default; color: var(--brun); }
.cal-day.other-month { color: #ddd; }
.cal-day.today       { background: var(--rouge); color: #fff; font-weight: 700; border-radius: 50%; }
.cal-day.has-event   { background: #FFF0F0; color: var(--rouge); font-weight: 700; cursor: pointer; }
.cal-day.has-event:hover { background: var(--rouge); color: #fff; }

/* ── Page Hero (sous-pages) ──────────────────────────────── */
.page-hero {
  padding: 7rem 2rem 3rem;
  background: linear-gradient(135deg, var(--noir) 0%, #3A0808 100%);
  color: #fff; text-align: center;
}
.page-hero h1 { color: #fff; margin-bottom: .75rem; }
.page-hero p   { color: rgba(255,255,255,.7); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { background: var(--noir); color: rgba(255,255,255,.65); padding: 3.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 2.5rem; }
.footer-brand { font-family: var(--font-titre); font-size: 1.2rem; color: #fff; margin-bottom: .75rem; }
.footer-col h4 { font-size: .65rem; letter-spacing: .2em; text-transform: uppercase; color: var(--rouge); margin-bottom: .9rem; }
.footer-col ul li { margin-bottom: .5rem; }
.footer-col ul a  { color: rgba(255,255,255,.6); font-size: .875rem; transition: color .2s; }
.footer-col ul a:hover { color: var(--jaune); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.25rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; font-size: .75rem; color: rgba(255,255,255,.35); }
.footer-bottom a { color: var(--rouge); }

/* ── Cookie banner ───────────────────────────────────────── */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 2000; background: rgba(26,26,26,.97); color: rgba(255,255,255,.85); padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; transform: translateY(100%); transition: transform .4s; }
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner a { color: var(--jaune); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-menu { display: none; flex-direction: column; position: fixed; top: 72px; left: 0; right: 0; background: var(--creme); padding: 1.5rem; gap: 1rem; border-bottom: 2px solid var(--rouge); }
  .nav-menu.open { display: flex; }
  .nav-burger { display: block; }
  .grid-3, .grid-2, .grid-2-1 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }
  .hero-logo { width: 90px; height: 90px; }
  .container { padding: 0 1.2rem; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-lg { width: 100%; text-align: center; }
}
