/* =============================================
   AMVCC — Association de Mise en Valeur du Château de Coucy
   Modern Medieval Theme
   ============================================= */

:root {
  --color-primary: #8B5E3C;
  --color-primary-dark: #5C3A1E;
  --color-primary-light: #C39D83;
  --color-accent: #B8860B;
  --color-accent-light: #DAA520;
  --color-bg: #FAF6F1;
  --color-bg-alt: #F0E8DE;
  --color-bg-dark: #2C1810;
  --color-text: #3A2A1A;
  --color-text-light: #6B5744;
  --color-text-muted: #9A8B7A;
  --color-white: #FFFFFF;
  --color-border: #D4C5B5;
  --font-heading: 'Cinzel', 'Georgia', serif;
  --font-body: 'Lora', 'Georgia', serif;
  --font-ui: 'Inter', 'Segoe UI', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
  --max-width: 1200px;
}

*, *::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(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  line-height: 1.3;
  letter-spacing: 0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.75rem); }
p { margin-bottom: 1em; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }

/* --- Section Heading --- */
.section-heading { text-align: center; margin-bottom: 3rem; }
.section-heading h2 { position: relative; display: inline-block; padding-bottom: 0.75rem; }
.section-heading h2::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 60px; height: 3px; background: var(--color-accent);
}
.section-heading p {
  color: var(--color-text-light); font-size: 1.1rem; max-width: 600px; margin: 1rem auto 0;
}

/* --- Header --- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(44, 24, 16, 0.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(195, 157, 131, 0.2);
  transition: background var(--transition);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 70px; }

.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo img { height: 50px; width: 50px; border-radius: 50%; }
.logo-text {
  font-family: var(--font-heading); color: var(--color-primary-light);
  font-size: 1.4rem; letter-spacing: 0.1em;
}
.logo-text span {
  display: block; font-family: var(--font-ui); font-size: 0.6rem;
  color: var(--color-text-muted); letter-spacing: 0.05em; text-transform: uppercase;
}

.nav-links { display: flex; list-style: none; gap: 0; }
.nav-links li { position: relative; }
.nav-links a {
  display: block; padding: 0.5rem 1rem; color: var(--color-primary-light);
  font-family: var(--font-ui); font-size: 0.85rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em;
  transition: color var(--transition), background var(--transition); border-radius: var(--radius);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--color-accent-light); background: rgba(195, 157, 131, 0.1);
}

.nav-links li:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--color-bg-dark); border-radius: var(--radius); padding: 0.5rem 0;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: all var(--transition); box-shadow: var(--shadow-lg);
  border: 1px solid rgba(195, 157, 131, 0.15);
}
.dropdown a { padding: 0.5rem 1.25rem; font-size: 0.8rem; border-radius: 0; }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--color-primary-light); margin: 5px 0; transition: var(--transition); }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    background: rgba(44, 24, 16, 0.98); flex-direction: column; padding: 1rem;
    border-top: 1px solid rgba(195, 157, 131, 0.2);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    background: rgba(0,0,0,0.2); box-shadow: none; border: none; display: none;
  }
  .nav-links li:hover .dropdown, .nav-links li.open .dropdown { display: block; }
}

/* --- Hero --- */
.hero {
  position: relative; height: 100vh; min-height: 600px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(44,24,16,0.6) 0%, rgba(44,24,16,0.4) 50%, rgba(44,24,16,0.8) 100%);
}
.hero-content {
  position: relative; z-index: 1; max-width: 800px; padding: 0 2rem;
  animation: fadeInUp 1s ease-out;
}
.hero-content h1 {
  color: var(--color-white); font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 0.5rem; text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}
.hero-content .subtitle {
  color: var(--color-primary-light); font-family: var(--font-ui);
  font-size: clamp(0.9rem, 2vw, 1.2rem); letter-spacing: 0.15em;
  text-transform: uppercase; margin-bottom: 1.5rem;
}
.hero-content p { color: rgba(255,255,255,0.85); font-size: 1.1rem; max-width: 600px; margin: 0 auto 2rem; }

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 0.8rem 2rem; font-family: var(--font-ui);
  font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  border-radius: var(--radius); transition: all var(--transition); cursor: pointer; border: none;
}
.btn-primary {
  background: var(--color-accent); color: var(--color-white);
  box-shadow: 0 4px 15px rgba(184, 134, 11, 0.3);
}
.btn-primary:hover {
  background: var(--color-accent-light); color: var(--color-white);
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(184,134,11,0.4);
}
.btn-outline { background: transparent; color: var(--color-white); border: 2px solid var(--color-primary-light); }
.btn-outline:hover { background: var(--color-primary-light); color: var(--color-bg-dark); }
.btn-dark { background: var(--color-primary-dark); color: var(--color-white); }
.btn-dark:hover { background: var(--color-primary); color: var(--color-white); transform: translateY(-2px); }

/* --- Sections --- */
section { padding: 5rem 0; }
section.alt-bg { background: var(--color-bg-alt); }

/* --- Card Grid --- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.card {
  background: var(--color-white); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-img { height: 220px; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 1.5rem; }
.card-body h3 { margin-bottom: 0.75rem; }
.card-body p { color: var(--color-text-light); font-size: 0.95rem; }
.card-body .btn { margin-top: 1rem; }

/* --- Feature Row --- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; margin-bottom: 4rem; }
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }
.feature-img { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.feature-img img { width: 100%; height: 400px; object-fit: cover; }
.feature-text h3 { margin-bottom: 1rem; }
.feature-text p { color: var(--color-text-light); }

@media (max-width: 768px) {
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 1.5rem; direction: ltr; }
  .feature-img img { height: 250px; }
}

/* --- Gallery --- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.gallery img { width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius); transition: transform var(--transition); cursor: pointer; }
.gallery img:hover { transform: scale(1.03); }

/* --- Page Hero (subpages) --- */
.page-hero {
  position: relative; height: 50vh; min-height: 350px;
  display: flex; align-items: center; justify-content: center; text-align: center; margin-top: 70px;
}
.page-hero .hero-bg::after {
  background: linear-gradient(to bottom, rgba(44,24,16,0.5) 0%, rgba(44,24,16,0.7) 100%);
}
.page-hero h1 { color: var(--color-white); text-shadow: 2px 2px 8px rgba(0,0,0,0.5); }
.page-hero p { color: rgba(255,255,255,0.85); font-size: 1.15rem; max-width: 700px; margin: 1rem auto 0; }

/* --- Content Block --- */
.content-block { max-width: 800px; margin: 0 auto; padding: 3rem 1.5rem; }
.content-block h2 { margin-bottom: 1rem; }
.content-block p { color: var(--color-text-light); font-size: 1.05rem; }
.content-block ul, .content-block ol { padding-left: 1.5rem; margin-bottom: 1.5rem; color: var(--color-text-light); }
.content-block li { margin-bottom: 0.5rem; }

/* --- CTA Section --- */
.cta-section { background: var(--color-bg-dark); text-align: center; padding: 4rem 2rem; }
.cta-section h2 { color: var(--color-primary-light); margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,0.7); max-width: 600px; margin: 0 auto 2rem; }

/* --- Timeline / Programme --- */
.timeline { max-width: 700px; margin: 0 auto; }
.timeline-day { margin-bottom: 2rem; }
.timeline-day h3 {
  background: var(--color-primary-dark); color: var(--color-white);
  padding: 0.75rem 1.5rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 1.1rem;
}
.timeline-item { display: flex; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--color-border); }
.timeline-time { font-family: var(--font-ui); font-weight: 700; color: var(--color-accent); min-width: 80px; font-size: 0.9rem; }
.timeline-desc { color: var(--color-text-light); }

/* --- Countdown --- */
.countdown { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.countdown-item { text-align: center; }
.countdown-number {
  display: block; font-family: var(--font-heading); font-size: 2.5rem;
  color: var(--color-accent); line-height: 1;
}
.countdown-label {
  display: block; font-family: var(--font-ui); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-muted); margin-top: 0.25rem;
}

/* --- Contact Form --- */
.contact-form { max-width: 600px; margin: 0 auto; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block; font-family: var(--font-ui); font-weight: 600; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; color: var(--color-text);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 0.8rem 1rem; border: 1px solid var(--color-border);
  border-radius: var(--radius); font-family: var(--font-body); font-size: 1rem;
  color: var(--color-text); background: var(--color-white); transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--color-accent); }
.form-group textarea { resize: vertical; min-height: 120px; }

/* --- Info Cards --- */
.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.info-card {
  background: var(--color-white); padding: 2rem; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); text-align: center;
}
.info-card .icon { font-size: 2.5rem; margin-bottom: 1rem; }
.info-card h4 { font-family: var(--font-heading); margin-bottom: 0.5rem; }
.info-card p { color: var(--color-text-light); font-size: 0.9rem; margin-bottom: 0; }

/* --- Footer --- */
.site-footer { background: var(--color-bg-dark); color: rgba(255,255,255,0.7); padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: var(--color-primary-light); font-family: var(--font-heading); font-size: 1rem; margin-bottom: 1rem; letter-spacing: 0.05em; }
.footer-col p { font-size: 0.9rem; line-height: 1.6; color: rgba(255,255,255,0.6); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul a { color: rgba(255,255,255,0.6); font-size: 0.9rem; transition: color var(--transition); }
.footer-col ul a:hover { color: var(--color-accent-light); }
.footer-social { display: flex; gap: 1rem; margin-top: 1rem; }
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.1); color: var(--color-primary-light);
  font-size: 1.1rem; transition: all var(--transition);
}
.footer-social a:hover { background: var(--color-accent); color: var(--color-white); }
.footer-bottom { text-align: center; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.8rem; font-family: var(--font-ui); }
.footer-labels { display: flex; justify-content: center; gap: 2rem; align-items: center; margin-bottom: 1.5rem; }
.footer-labels img { height: 60px; opacity: 0.8; transition: opacity var(--transition); }
.footer-labels img:hover { opacity: 1; }

/* --- Animations --- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.stagger > * { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.stagger.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger.visible > * { opacity: 1; transform: translateY(0); }

/* Actualités cards */
.actu-card { background: var(--color-white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.3s, box-shadow 0.3s; }
.actu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.actu-card-img { height: 180px; background-size: cover; background-position: center; }
.actu-card-body { padding: 1.5rem; }
.actu-date { font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600; color: var(--color-accent); text-transform: uppercase; letter-spacing: 0.05em; }
.actu-card-body h4 { font-family: var(--font-heading); margin: 0.5rem 0; font-size: 1.1rem; color: var(--color-primary-dark); }
.actu-card-body p { color: var(--color-text-light); font-size: 0.9rem; margin-bottom: 1rem; }
.actu-link { font-family: var(--font-ui); font-size: 0.85rem; font-weight: 600; color: var(--color-primary); text-decoration: none; }
.actu-link:hover { color: var(--color-accent); }

@media (max-width: 768px) {
  section { padding: 3rem 0; }
  .card-grid { grid-template-columns: 1fr; }
  .hero { min-height: 500px; }
  .footer-grid { grid-template-columns: 1fr; }
}
