/* =====================================================================
   Agence Matrimoniale — Design premium
   Palette : bordeaux profond (--color-primary) + or discret (--color-secondary)
   Typo : Cormorant Garamond (titres, élégance) + DM Sans (texte, lisibilité)
   ===================================================================== */

:root {
  --color-primary: #8B1E3F;
  --color-secondary: #C9A227;
  --color-ink: #26201d;
  --color-cream: #F8F3EC;
  --color-cream-2: #F1E9DD;
  --color-muted: #7a6f66;
  --shadow-soft: 0 20px 50px rgba(38, 32, 29, 0.08);
  --shadow-card: 0 12px 30px rgba(38, 32, 29, 0.10);
  --radius-lg: 18px;
  --radius-md: 12px;
}

* { box-sizing: border-box; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--color-ink);
  background: var(--color-cream);
  line-height: 1.65;
}

h1, h2, h3, h4, .am-serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.2px;
}

a { text-decoration: none; }

::selection { background: var(--color-secondary); color: #fff; }

/* --- Navbar --- */
.am-navbar {
  background: rgba(248, 243, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(38,32,29,0.06);
  padding: 0.45rem 0;
  transition: box-shadow .3s ease;
}
.am-navbar.scrolled { box-shadow: var(--shadow-soft); }
.am-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary) !important;
  display: flex; align-items: center; gap: .4rem;
}
.am-brand img { height: 32px; }
.am-navbar .nav-link {
  color: var(--color-ink);
  font-weight: 500;
  font-size: .85rem;
  position: relative;
  margin: 0 .3rem;
  padding: .3rem .4rem;
}
.am-navbar .nav-link::after {
  content: '';
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--color-secondary);
  transition: width .25s ease;
}
.am-navbar .nav-link:hover::after { width: 100%; }

.am-btn-primary {
  background: var(--color-primary);
  color: #fff !important;
  border: none;
  border-radius: 999px;
  padding: .7rem 1.6rem;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 10px 25px rgba(139,30,63,0.25);
}
.am-btn-primary:hover { transform: translateY(-2px); background: #741934; box-shadow: 0 14px 30px rgba(139,30,63,0.32); }

.am-btn-outline {
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary) !important;
  border-radius: 999px;
  font-weight: 600;
  background: transparent;
  transition: all .2s ease;
}
.am-btn-outline:hover { background: var(--color-primary); color: #fff !important; }

.am-btn-whatsapp {
  background: #25D366; color: #fff !important; border: none; border-radius: 999px;
  padding: .8rem 1.8rem; font-weight: 700; box-shadow: 0 10px 25px rgba(37,211,102,.3);
  transition: transform .2s ease;
}
.am-btn-whatsapp:hover { transform: translateY(-2px); color:#fff !important; }

/* --- Hero --- */
.am-hero {
  position: relative;
  padding: 7rem 0 6rem;
  background: linear-gradient(160deg, var(--color-cream) 0%, var(--color-cream-2) 100%);
  overflow: hidden;
}
.am-hero::before {
  content: '';
  position: absolute; top: -120px; right: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,39,0.18) 0%, rgba(201,162,39,0) 70%);
}
.am-hero::after {
  content: '';
  position: absolute; bottom: -160px; left: -100px;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,30,63,0.12) 0%, rgba(139,30,63,0) 70%);
}
.am-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--color-primary); font-weight: 600; font-size: .8rem;
  letter-spacing: 1.5px; text-transform: uppercase;
  background: rgba(139,30,63,0.08); padding: .4rem 1rem; border-radius: 999px;
}
.am-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  color: var(--color-ink);
  margin: 1.2rem 0 1rem;
}
.am-hero h1 em { color: var(--color-primary); font-style: normal; }
.am-hero p.lead { color: var(--color-muted); font-size: 1.15rem; max-width: 540px; }

.am-stats { display: flex; gap: 2.2rem; margin-top: 2.5rem; }
.am-stat-number { font-family: 'Cormorant Garamond', serif; font-size: 2.2rem; font-weight: 700; color: var(--color-primary); }
.am-stat-label { font-size: .82rem; color: var(--color-muted); }

.am-hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, var(--color-primary), #5a1329);
  display: flex; align-items: center; justify-content: center;
}
.am-hero-visual i { font-size: 5rem; color: rgba(255,255,255,0.85); }
.am-hero-badge {
  position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%);
  background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-card);
  padding: .9rem 1.4rem; display: flex; align-items: center; gap: .7rem;
  min-width: 260px;
}

/* --- Sections génériques --- */
.am-section { padding: 5.5rem 0; }
.am-section-alt { background: #fff; }
.am-section-title { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.am-section-title .am-eyebrow { margin-bottom: 1rem; }
.am-section-title h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.am-section-title p { color: var(--color-muted); }

/* --- Cards "Pourquoi nous choisir" --- */
.am-feature-card {
  background: #fff; border-radius: var(--radius-lg); padding: 2.2rem 1.8rem;
  box-shadow: var(--shadow-card); height: 100%;
  transition: transform .3s ease, box-shadow .3s ease;
  border: 1px solid rgba(38,32,29,0.04);
}
.am-feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.am-feature-icon {
  width: 58px; height: 58px; border-radius: 16px;
  background: rgba(139,30,63,0.08); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
  margin-bottom: 1.2rem;
}
.am-feature-card h5 { font-family: 'DM Sans'; font-weight: 700; font-size: 1.05rem; }
.am-feature-card p { color: var(--color-muted); font-size: .92rem; margin: 0; }

/* --- Étapes "Comment ça fonctionne" --- */
.am-step { text-align: center; position: relative; padding: 0 1rem; }
.am-step-number {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--color-primary); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 1.2rem;
  margin: 0 auto 1rem;
}
.am-step h6 { font-weight: 700; }
.am-step p { color: var(--color-muted); font-size: .88rem; }

/* --- Cartes profils --- */
.am-profile-card {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-card); transition: transform .3s ease, box-shadow .3s ease;
  height: 100%; display: flex; flex-direction: column;
  border: 1px solid rgba(38,32,29,0.04);
}
.am-profile-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.am-profile-photo { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--color-cream-2); }
.am-profile-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.am-profile-card:hover .am-profile-photo img { transform: scale(1.06); }
.am-profile-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--color-secondary); color: #fff; font-size: .72rem; font-weight: 700;
  padding: .3rem .7rem; border-radius: 999px; letter-spacing: .5px;
}
.am-profile-religion {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,0.92); color: var(--color-primary); font-size: .72rem; font-weight: 700;
  padding: .3rem .7rem; border-radius: 999px;
}
.am-profile-body { padding: 1.3rem; flex: 1; display: flex; flex-direction: column; }
.am-profile-name { font-family: 'Cormorant Garamond', serif; font-size: 1.35rem; font-weight: 700; margin-bottom: .2rem; }
.am-profile-meta { font-size: .84rem; color: var(--color-muted); margin-bottom: .9rem; display:flex; flex-wrap:wrap; gap:.4rem .8rem; }
.am-profile-meta span { display: flex; align-items: center; gap: .35rem; }
.am-profile-meta i { color: var(--color-secondary); }

/* --- Filtres recherche --- */
.am-filter-panel {
  background: #fff; border-radius: var(--radius-lg); padding: 1.6rem;
  box-shadow: var(--shadow-card); position: sticky; top: 100px;
}
.am-filter-panel label { font-size: .82rem; font-weight: 600; margin-top: .8rem; display: block; }
.am-filter-panel select, .am-filter-panel input {
  border-radius: 8px; border: 1px solid #e5ddd0; font-size: .88rem;
}

/* --- Détail profil --- */
.am-detail-gallery-main { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); aspect-ratio: 4/5; }
.am-detail-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.am-thumb { border-radius: 10px; overflow: hidden; cursor: pointer; aspect-ratio: 1/1; border: 2px solid transparent; }
.am-thumb.active { border-color: var(--color-secondary); }
.am-thumb img { width: 100%; height: 100%; object-fit: cover; }
.am-detail-title { font-size: 2.2rem; }
.am-tag {
  display: inline-block; background: var(--color-cream-2); color: var(--color-ink);
  padding: .35rem .9rem; border-radius: 999px; font-size: .82rem; margin: 0 .4rem .4rem 0;
}
.am-info-row { display: flex; justify-content: space-between; padding: .6rem 0; border-bottom: 1px dashed #e5ddd0; font-size: .92rem; }
.am-info-row span:first-child { color: var(--color-muted); }
.am-info-row span:last-child { font-weight: 600; }

/* --- Témoignages --- */
.am-testimonial-card {
  background: #fff; border-radius: var(--radius-lg); padding: 1.8rem; box-shadow: var(--shadow-card); height: 100%;
}
.am-testimonial-stars { color: var(--color-secondary); font-size: .85rem; margin-bottom: .6rem; }
.am-testimonial-text { font-style: italic; color: var(--color-ink); font-size: .95rem; }
.am-testimonial-author { display: flex; align-items: center; gap: .8rem; margin-top: 1.2rem; }
.am-testimonial-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--color-cream-2); }
.am-testimonial-gallery { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .3rem; }
.am-testimonial-gallery-img { width: 140px; height: 140px; object-fit: cover; border-radius: var(--radius-md); flex-shrink: 0; cursor: pointer; transition: transform .2s; }
.am-testimonial-gallery-img:hover { transform: scale(1.05); }

/* --- FAQ accordéon --- */
.am-accordion .accordion-item { border: none; margin-bottom: .8rem; border-radius: var(--radius-md) !important; overflow: hidden; box-shadow: var(--shadow-card); }
.am-accordion .accordion-button { font-weight: 600; background: #fff; }
.am-accordion .accordion-button:not(.collapsed) { color: var(--color-primary); background: var(--color-cream-2); }
.am-accordion .accordion-button:focus { box-shadow: none; }

/* --- CTA final --- */
.am-cta {
  background: linear-gradient(135deg, var(--color-primary), #5a1329);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem; text-align: center; color: #fff; position: relative; overflow: hidden;
}
.am-cta h2 { color: #fff; }
.am-cta p { color: rgba(255,255,255,0.8); }

/* --- Footer --- */
.am-footer { background: var(--color-ink); color: rgba(255,255,255,0.75); }
.am-footer-title { font-family: 'Cormorant Garamond', serif; color: #fff; font-size: 1.4rem; }
.am-footer-heading { color: #fff; font-size: .92rem; font-weight: 700; margin-bottom: 1rem; }
.am-footer-links a { color: rgba(255,255,255,0.65); font-size: .88rem; line-height: 2.1; }
.am-footer-links a:hover { color: var(--color-secondary); }
.am-footer-text { color: rgba(255,255,255,0.6); font-size: .88rem; }
.am-footer-divider { border-color: rgba(255,255,255,0.1); margin: 2rem 0 1.2rem; }
.am-footer-copy { color: rgba(255,255,255,0.45); font-size: .8rem; }
.am-social {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center; color: #fff;
  transition: background .2s ease;
}
.am-social:hover { background: var(--color-secondary); }

.am-back-to-top {
  position: fixed; bottom: 24px; right: 24px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--color-primary); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-soft); opacity: 0; visibility: hidden; transition: all .3s ease; z-index: 999;
}
.am-back-to-top.visible { opacity: 1; visibility: visible; }

/* --- Reveal au scroll --- */
.am-reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.am-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* --- Skeleton loading (AJAX) --- */
.am-skeleton { background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%); background-size: 400% 100%; animation: am-shimmer 1.4s ease infinite; border-radius: var(--radius-lg); }
@keyframes am-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* --- Modal formulaire --- */
.am-modal .modal-content { border-radius: var(--radius-lg); border: none; box-shadow: var(--shadow-soft); }
.am-modal .form-label { font-size: .85rem; font-weight: 600; }
.am-modal .form-control, .am-modal .form-select { border-radius: 8px; border-color: #e5ddd0; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

/* --- Tablette (≤ 992px) --- */
@media (max-width: 991.98px) {
  .am-hero { padding: 5rem 0 4rem; }
  .am-hero .d-flex { justify-content: center; }
  .am-hero-visual { margin-top: 2.5rem; max-width: 380px; margin-inline: auto; }
  .am-hero-badge { min-width: auto; }
  .am-footer .row > div { margin-bottom: 2rem; }
}

/* --- Mobile large (≤ 768px) --- */
@media (max-width: 768px) {
  .am-hero { padding: 4rem 0 3rem; text-align: center; }
  .am-hero .d-flex { justify-content: center; }
  .am-stats { justify-content: center; flex-wrap: wrap; gap: 1.4rem; }
  .am-hero-visual { max-width: 320px; margin-inline: auto; }
  .am-hero-badge { position: static; transform: none; margin-top: 1.5rem; min-width: auto; }
  .am-section { padding: 3.5rem 0; }
  .am-section-title { margin-bottom: 2rem; }
  .am-detail-title { font-size: 1.7rem; }
  .am-info-row { font-size: .85rem; padding: .5rem 0; }
  .am-cta { padding: 3rem 1.5rem; }
  .am-cta h2 { font-size: 1.6rem; }
  .am-filter-panel { position: static; margin-bottom: 2rem; }
  .am-footer .row > div { margin-bottom: 1.5rem; }
  .am-testimonial-card { padding: 1.3rem; }
  .am-step { margin-bottom: 1.5rem; }
  .am-back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: .85rem; }
}

/* --- Mobile small (≤ 576px) --- */
@media (max-width: 575.98px) {
  .am-hero { padding: 3.5rem 0 2.5rem; }
  .am-hero h1 { font-size: 1.8rem; }
  .am-hero p.lead { font-size: 1rem; }
  .am-eyebrow { font-size: .72rem; padding: .35rem .8rem; }
  .am-stats { gap: 1rem; }
  .am-stat-number { font-size: 1.6rem; }
  .am-stat-label { font-size: .75rem; }
  .am-hero-visual { max-width: 260px; }
  .am-hero-visual i { font-size: 3rem; }
  .am-section { padding: 2.5rem 0; }
  .am-section-title h2 { font-size: 1.5rem; }
  .am-feature-card { padding: 1.5rem 1.2rem; }
  .am-feature-icon { width: 46px; height: 46px; font-size: 1.1rem; }
  .am-profile-name { font-size: 1.15rem; }
  .am-profile-body { padding: 1rem; }
  .am-profile-meta { font-size: .78rem; }
  .am-btn-primary, .am-btn-outline { padding: .6rem 1.2rem; font-size: .88rem; }
  .am-btn-whatsapp { padding: .65rem 1.3rem; font-size: .88rem; }
  .am-detail-gallery-main { aspect-ratio: 1/1; }
  .am-info-row { flex-direction: column; gap: .15rem; }
  .am-info-row span:first-child { font-size: .78rem; }
  .am-info-row span:last-child { font-size: .88rem; }
  .am-tag { font-size: .76rem; padding: .3rem .7rem; }
  .am-accordion .accordion-button { font-size: .9rem; padding: .8rem 1rem; }
  .am-accordion .accordion-body { font-size: .85rem; padding: .8rem 1rem; }
  .am-cta { padding: 2.5rem 1.2rem; border-radius: var(--radius-md); }
  .am-cta h2 { font-size: 1.4rem; }
  .am-cta p { font-size: .9rem; }
  .am-testimonial-text { font-size: .88rem; }
  .am-testimonial-avatar { width: 36px; height: 36px; }
  .am-testimonial-gallery-img { width: 110px; height: 110px; }
  .am-footer { padding-top: 2rem; }
  .am-footer-title { font-size: 1.2rem; }
  .am-footer-heading { font-size: .85rem; }
  .am-footer-links a { font-size: .82rem; line-height: 1.9; }
  .am-footer-text { font-size: .82rem; }
  .am-social { width: 34px; height: 34px; font-size: .85rem; }
  .am-back-to-top { bottom: 12px; right: 12px; width: 36px; height: 36px; }
  .am-modal .modal-content { border-radius: var(--radius-md); margin: .5rem; }
}

/* --- Navbar mobile : pleine largeur --- */
@media (max-width: 991.98px) {
  .am-navbar .navbar-collapse { padding: .5rem 0; }
  .am-navbar .nav-link { padding: .4rem 0; font-size: .9rem; }
  .am-navbar .navbar-nav { gap: .2rem !important; }
  .am-navbar .am-btn-outline { margin-top: .3rem; display: inline-block; }
}
