/* ============================================================
   Les Tancrède — Centre Équestre
   style.css — PHP natif, pas de framework
   ============================================================ */

/* --- Imports Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:wght@300;400;600&display=swap');

/* --- Variables --- */
:root {
  --terre:    #1C1A17;
  --lin:      #F7F3EE;
  --vert:     #4A6741;
  --vert-clair: #6a9160;
  --or:       #C8A96E;
  --brun:     #8B5E3C;
  --lin-gris: #E8E2D9;
  --blanc:    #FFFFFF;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;

  --radius: 4px;
  --shadow: 0 2px 12px rgba(28, 26, 23, 0.10);
  --transition: 0.22s ease;
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--lin);
  color: var(--terre);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--vert); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--terre);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--lin);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-logo-img {
  height: 50px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.nav-logo:hover { text-decoration: none; color: var(--or); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav-links a {
  display: block;
  color: var(--lin-gris);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--vert);
  color: var(--blanc);
  text-decoration: none;
}

/* Burger mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.4rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--lin);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ============================================================
   HERO (page d'accueil)
   ============================================================ */
.hero {
  background: var(--terre);
  position: relative;
  overflow: hidden;
  padding: 5rem 2rem 4.5rem;
  text-align: center;
}

/* Fer à cheval en filigrane */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpath d='M100 20 C55 20 20 55 20 100 C20 135 40 160 68 175 L68 155 C48 143 36 123 36 100 C36 64 65 36 100 36 C135 36 164 64 164 100 C164 123 152 143 132 155 L132 175 C160 160 180 135 180 100 C180 55 145 20 100 20Z M68 175 L68 195 L85 195 L85 175Z M115 175 L115 195 L132 195 L132 175Z' fill='%234A6741' fill-opacity='0.07'/%3E%3C/svg%3E");
  background-size: 420px;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--or);
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  color: var(--lin);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.hero h1 em {
  color: var(--or);
  font-style: italic;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--lin-gris);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn-primary {
  background: var(--vert);
  color: var(--blanc);
}
.btn-primary:hover { background: var(--vert-clair); color: var(--blanc); }

.btn-outline {
  background: transparent;
  color: var(--lin);
  border: 1.5px solid var(--or);
  margin-left: 0.75rem;
}
.btn-outline:hover { background: var(--or); color: var(--terre); }

/* ============================================================
   SECTIONS COMMUNES
   ============================================================ */
.section {
  padding: 4.5rem 2rem;
}
.section-alt {
  background: var(--lin-gris);
}
.section-dark {
  background: var(--terre);
  color: var(--lin);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}
.container-narrow {
  max-width: 780px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vert);
  margin-bottom: 0.6rem;
}
.section-dark .section-label { color: var(--or); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--brun);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.section-dark .section-title { color: var(--lin); }

.section-intro {
  font-size: 1.02rem;
  color: #5a5248;
  max-width: 600px;
  margin-bottom: 3rem;
  line-height: 1.8;
}
.section-dark .section-intro { color: var(--lin-gris); }

/* ============================================================
   CARDS DE SERVICES
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--blanc);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  border-left: 4px solid var(--vert);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(28, 26, 23, 0.13);
}

.service-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  color: var(--vert);
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brun);
  margin-bottom: 0.6rem;
}

.service-card p {
  font-size: 0.92rem;
  color: #5a5248;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.service-card a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--vert);
  letter-spacing: 0.04em;
}
.service-card a:hover { color: var(--brun); }

/* ============================================================
   SECTION ACTIVITÉS (page activites.php)
   ============================================================ */
.activity-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--lin-gris);
}
.activity-block:last-child { border-bottom: none; }
.activity-block.reverse { direction: rtl; }
.activity-block.reverse > * { direction: ltr; }

.activity-text h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--brun);
  margin-bottom: 0.8rem;
  line-height: 1.2;
}

.activity-text p {
  font-size: 1rem;
  color: #5a5248;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

.activity-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
  background: var(--lin-gris);
  display: flex;
  align-items: center;
  justify-content: center;
}
.activity-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder si pas d'image */
.img-placeholder {
  color: var(--or);
  opacity: 0.5;
  font-size: 3rem;
}

/* ============================================================
   TABLEAUX DE TARIFS
   ============================================================ */
.tarifs-section {
  margin-bottom: 3rem;
}

.tarifs-section h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brun);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--or);
  display: inline-block;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 0.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--blanc);
  font-size: 0.9rem;
}

thead th {
  background: var(--terre);
  color: var(--lin);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1.1rem;
  text-align: left;
}

tbody td {
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--lin-gris);
  color: var(--terre);
  vertical-align: top;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover { background: #f0ede8; }

td:last-child, th:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--vert);
}
thead th:last-child { color: var(--or); }

.tarif-note {
  font-size: 0.82rem;
  color: #7a7268;
  margin-top: 0.4rem;
  font-style: italic;
}

.tarif-note a {
  color: var(--vert);
  font-weight: 600;
  font-style: normal;
}

.tarifs-docs {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.tarifs-docs a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  background: var(--terre);
  color: var(--lin);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background var(--transition);
}
.tarifs-docs a:hover { background: var(--brun); text-decoration: none; }
.tarifs-docs svg { flex-shrink: 0; }

/* ============================================================
   PAGE CONTACT
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a5248;
  margin-bottom: 0.35rem;
  margin-top: 1.25rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--lin-gris);
  border-radius: var(--radius);
  background: var(--blanc);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--terre);
  transition: border-color var(--transition);
  outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--vert);
}
.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}
.contact-form label:first-child { margin-top: 0; }

.contact-form .btn {
  margin-top: 1.5rem;
  width: 100%;
  text-align: center;
}

/* Messages flash */
.flash {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  font-weight: 600;
}
.flash-success { background: #d4edda; color: #1a5c2e; border-left: 4px solid var(--vert); }
.flash-error   { background: #f8d7da; color: #6b1a22; border-left: 4px solid #c0392b; }

.contact-info h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brun);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}
.contact-info h3:first-child { margin-top: 0; }

.contact-info p,
.contact-info address { font-style: normal; font-size: 0.96rem; color: #5a5248; line-height: 1.8; }
.contact-info a { color: var(--vert); font-weight: 600; }

.horaires-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem 1.5rem;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
.horaires-grid .jour { font-weight: 600; color: var(--terre); }
.horaires-grid .heure { color: #5a5248; }
.horaires-grid .ferme { color: #b0a99e; }

/* ============================================================
   PAGE BOUTIQUE
   ============================================================ */
.boutique-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.boutique-products h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--brun);
  margin-bottom: 1.5rem;
}

.product-list {
  list-style: none;
  margin-bottom: 1.5rem;
}
.product-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--lin-gris);
  font-size: 0.96rem;
}
.product-list li:last-child { border-bottom: none; }
.product-name { color: var(--terre); }
.product-price {
  font-weight: 700;
  color: var(--vert);
  font-size: 1.05rem;
}

.boutique-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ============================================================
   ENCART LABELS (bio FFE, etc.)
   ============================================================ */
.labels-band {
  background: var(--lin-gris);
  padding: 2rem;
  text-align: center;
}
.labels-band img {
  max-height: 80px;
  margin: 0 auto;
  opacity: 0.85;
}

/* ============================================================
   PAGE TITLE HERO (pages internes)
   ============================================================ */
.page-hero {
  background: var(--terre);
  padding: 3rem 2rem 2.5rem;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--vert), var(--or), var(--vert));
}

.page-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.page-hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--or);
  margin-bottom: 0.5rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--lin);
  line-height: 1.15;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--terre);
  color: var(--lin-gris);
  padding: 3rem 2rem 1.5rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand .nav-logo {
  font-size: 1.2rem;
  display: inline-block;
  margin-bottom: 0.8rem;
}
.footer-brand p {
  font-size: 0.88rem;
  color: #8a8278;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--or);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.45rem; }
.footer-col ul a {
  color: #8a8278;
  font-size: 0.88rem;
  transition: color var(--transition);
}
.footer-col ul a:hover { color: var(--lin); text-decoration: none; }

.footer-col address {
  font-style: normal;
  color: #8a8278;
  font-size: 0.88rem;
  line-height: 1.8;
}
.footer-col address a { color: var(--vert-clair); }

.footer-bottom {
  max-width: 1100px;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid #2e2b27;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-bottom p { font-size: 0.8rem; color: #5a5650; }
.footer-bottom a { color: #5a5650; }
.footer-bottom a:hover { color: var(--lin-gris); }

/* ============================================================
   MENTIONS LÉGALES
   ============================================================ */
.legal-content {
  font-size: 0.96rem;
  color: #4a4640;
  line-height: 1.9;
}
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--brun);
  margin: 2rem 0 0.6rem;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content a { color: var(--vert); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--terre);
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.15rem;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .site-header { position: relative; }

  .hero { padding: 3.5rem 1.25rem 3rem; }
  .hero h1 { font-size: 2rem; }
  .btn-outline { margin-left: 0; margin-top: 0.75rem; display: block; text-align: center; }

  .activity-block { grid-template-columns: 1fr; gap: 1.5rem; }
  .activity-block.reverse { direction: ltr; }

  .contact-layout,
  .boutique-layout { grid-template-columns: 1fr; gap: 2.5rem; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .services-grid { grid-template-columns: 1fr; }

  .section { padding: 3rem 1.25rem; }
}

@media (min-width: 660px) and (max-width: 1000px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  html { scroll-behavior: auto; }
}
