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

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--color-text); background: var(--color-bg); font-size: 1rem; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ===== ACCESSIBILITY ===== */
.skip-link { position: absolute; top: -4rem; left: 1rem; padding: .5rem 1rem; background: var(--color-secondary); color: #fff; font-weight: 600; border-radius: 0 0 4px 4px; transition: top .2s; z-index: 9999; }
.skip-link:focus { top: 0; }

/* ===== LAYOUT ===== */
.container { width: 100%; max-width: 1100px; margin-inline: auto; padding-inline: 1.25rem; }
section { padding-block: 3rem; }

/* ===== HEADER ===== */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--color-primary); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-block: .75rem; gap: 1rem; }
.site-logo img { height: 48px; width: auto; }

/* nav mobile */
.site-nav { display: none; position: fixed; inset: 0; background: var(--color-primary); z-index: 99; padding-top: 5rem; padding-inline: 2rem; }
.site-nav.open { display: block; }
.site-nav ul { flex-direction: column; gap: 1.5rem; display: flex; }
.site-nav a { font-family: var(--font-body); font-size: 1.2rem; color: #fff; font-weight: 600; letter-spacing: .04em; display: block; padding-block: .5rem; border-bottom: 1px solid rgba(255,255,255,.12); transition: color .2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--color-accent); }

/* hamburger */
.nav-toggle { background: none; border: 2px solid rgba(255,255,255,.5); border-radius: 4px; cursor: pointer; padding: .4rem .55rem; display: flex; flex-direction: column; gap: 5px; z-index: 200; position: relative; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero { background: linear-gradient(135deg, var(--color-primary) 0%, #2d1a26 60%, #3a0d1e 100%); color: #fff; padding-block: 4rem 3.5rem; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 50%, rgba(225,29,72,.18) 0%, transparent 70%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; }
.hero h1 { font-family: var(--font-display); font-size: clamp(1.75rem, 5vw, 3.25rem); line-height: 1.2; margin-bottom: 1rem; }
.hero h1 em { font-style: italic; color: var(--color-accent); }
.hero .tagline { font-size: clamp(.95rem, 2.5vw, 1.2rem); color: rgba(255,255,255,.8); margin-bottom: 2rem; font-style: italic; }
.hero-desc { max-width: 640px; margin-inline: auto; margin-bottom: 2.5rem; color: rgba(255,255,255,.88); }
.hero-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 8px; margin-top: 2.5rem; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.75rem; border-radius: 4px; font-family: var(--font-body); font-size: .95rem; font-weight: 600; letter-spacing: .04em; cursor: pointer; border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .15s; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--color-secondary); color: #fff; border-color: var(--color-secondary); }
.btn-primary:hover { background: #c0173e; border-color: #c0173e; }
.btn-accent { background: var(--color-accent); color: var(--color-primary); border-color: var(--color-accent); }
.btn-accent:hover { background: #e0aa10; border-color: #e0aa10; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-fb { background: #1877F2; color: #fff; border-color: #1877F2; }
.btn-fb:hover { background: #1462cc; border-color: #1462cc; }
.btn-group { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* ===== SECTION TITLES ===== */
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 3.5vw, 2.25rem); color: var(--color-primary); margin-bottom: .5rem; }
.section-title p { color: #6b7280; font-size: 1.05rem; }
.section-title--light h2 { color: #fff; }
.section-title--light p { color: rgba(255,255,255,.75); }

/* ===== CARD GRID ===== */
.card-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.card { background: var(--color-bg); border: 1px solid #f0e6ea; border-radius: 8px; padding: 1.75rem 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-2px); }
.card h3 { font-family: var(--font-display); font-size: 1.15rem; color: var(--color-primary); margin-bottom: .5rem; }
.card .card-tag { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--color-secondary); margin-bottom: .5rem; }
.card ul { list-style: disc; padding-left: 1.25rem; color: #4b5563; font-size: .95rem; margin-top: .5rem; }

/* ===== SERVICE SECTION ===== */
.service-section { border-bottom: 1px solid #f0e6ea; padding-bottom: 2.5rem; margin-bottom: 2.5rem; }
.service-section:last-child { border-bottom: none; }
.service-section h2 { font-family: var(--font-display); font-size: clamp(1.25rem, 3vw, 1.75rem); color: var(--color-primary); margin-bottom: .75rem; }
.service-section p { color: #4b5563; margin-bottom: .75rem; }
.service-section ul { display: grid; gap: .4rem; margin-top: .75rem; }
.service-section ul li::before { content: '✦ '; color: var(--color-secondary); font-size: .8em; }

/* ===== ABOUT ===== */
.about-content { max-width: 760px; margin-inline: auto; }
.about-content p { margin-bottom: 1.25rem; font-size: 1.05rem; }
.about-content em { font-style: italic; color: var(--color-secondary); }

/* ===== CTA BANNER ===== */
.cta-banner { background: linear-gradient(135deg, var(--color-secondary) 0%, #a0122e 100%); color: #fff; text-align: center; }
.cta-banner h2 { font-family: var(--font-display); font-size: clamp(1.4rem, 3.5vw, 2rem); margin-bottom: 1rem; }
.cta-banner p { margin-bottom: 1.75rem; font-size: 1.05rem; opacity: .9; }

/* ===== GALLERY ===== */
.gallery-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.gallery-item { position: relative; overflow: hidden; border-radius: 6px; aspect-ratio: 1; background: #f3e6ec; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.gallery-item:hover img { transform: scale(1.05); }

/* ===== CONTACT ===== */
.contact-grid { display: grid; gap: 2.5rem; }
.contact-info h2 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 1.25rem; color: var(--color-primary); }
.contact-item { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1rem; font-size: 1rem; }
.contact-item .ci-label { font-weight: 600; min-width: 5rem; color: var(--color-primary); }
.contact-form { background: #fdf2f6; border-radius: 8px; padding: 2rem 1.5rem; }
.contact-form h2 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 1.25rem; color: var(--color-primary); }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .95rem; color: var(--color-primary); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: .65rem .9rem; border: 1.5px solid #e0c0cc; border-radius: 4px; font-family: var(--font-body); font-size: 1rem; background: #fff; color: var(--color-text); transition: border-color .2s, box-shadow .2s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(225,29,72,.15); }
.form-group textarea { resize: vertical; min-height: 120px; }
.rgpd-note { font-size: .8rem; color: #6b7280; margin-top: 1rem; line-height: 1.5; }
.map-wrapper { border-radius: 8px; overflow: hidden; border: 1px solid #e5e7eb; margin-top: 1.5rem; }
.map-wrapper iframe { display: block; width: 100%; border: none; }

/* ===== FORMATION ===== */
.formation-step { padding: 1.5rem; border-left: 4px solid var(--color-secondary); background: #fdf2f6; border-radius: 0 8px 8px 0; margin-bottom: 1.5rem; }
.formation-step h3 { font-family: var(--font-display); font-size: 1.1rem; color: var(--color-primary); margin-bottom: .5rem; }
.formation-step ul { list-style: disc; padding-left: 1.25rem; color: #4b5563; font-size: .95rem; margin-top: .5rem; }
.highlight-box { background: var(--color-primary); color: #fff; border-radius: 8px; padding: 2rem; text-align: center; margin-block: 2rem; }
.highlight-box h3 { font-family: var(--font-display); font-size: 1.3rem; color: var(--color-accent); margin-bottom: .75rem; }

/* ===== FOOTER ===== */
.site-footer { background: var(--color-primary); color: rgba(255,255,255,.8); padding-block: 2.5rem 1.25rem; }
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { font-family: var(--font-display); color: #fff; font-size: 1.05rem; margin-bottom: .75rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .4rem; }
.footer-col a:hover { color: var(--color-accent); }
.social-link { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .75rem; background: #1877F2; color: #fff !important; border-radius: 4px; font-size: .9rem; font-weight: 600; margin-top: .5rem; transition: background .2s; }
.social-link:hover { background: #1462cc !important; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 1rem; font-size: .85rem; text-align: center; color: rgba(255,255,255,.5); }
.footer-bottom a { color: rgba(255,255,255,.6); }
.footer-bottom a:hover { color: var(--color-accent); }

/* ===== PAGE HERO ===== */
.page-hero { background: linear-gradient(135deg, var(--color-primary) 0%, #2d1a26 100%); color: #fff; padding-block: 3rem 2.5rem; text-align: center; }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(1.5rem, 4vw, 2.5rem); line-height: 1.25; margin-bottom: .75rem; }
.page-hero p { color: rgba(255,255,255,.82); max-width: 600px; margin-inline: auto; }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.6); margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; }
.breadcrumb a { color: rgba(255,255,255,.7); text-decoration: underline; }

/* ===== UTILS ===== */
.section-stripe { background: #fdf8fb; }
.pexels-attr { font-size: .78rem; color: #9ca3af; margin-top: .35rem; text-align: right; }
.pexels-attr a { color: #9ca3af; text-decoration: underline; }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }

/* ===== ANIMATIONS ===== */

/* Focus ring — always active, no motion dependency */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Hard reset for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* All motion — gated */
@media (prefers-reduced-motion: no-preference) {

  /* Scroll reveal */
  .fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .55s ease, transform .55s ease;
  }
  .fade-in.visible {
    opacity: 1;
    transform: none;
  }
  /* Stagger for card grids */
  .card-grid .fade-in:nth-child(2) { transition-delay: .09s; }
  .card-grid .fade-in:nth-child(3) { transition-delay: .18s; }

  /* Hero entrance — triggers on page load */
  @keyframes hero-rise {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
  }
  .hero .container > * {
    animation: hero-rise .65s cubic-bezier(.22,.61,.36,1) both;
  }
  .hero .container > *:nth-child(2) { animation-delay: .12s; }
  .hero .container > *:nth-child(3) { animation-delay: .22s; }

  /* Button hover lift */
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: scale(.97) translateY(0); }
}

/* Nav underline slide — desktop only */
@media (prefers-reduced-motion: no-preference) and (min-width: 1024px) {
  .site-nav a:not([aria-current]) {
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1.5px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size .25s ease, color .2s;
  }
  .site-nav a:not([aria-current]):hover { background-size: 100% 1.5px; }
}

/* ===== TABLETTE ===== */
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== DESKTOP ===== */
@media (min-width: 1024px) {
  section { padding-block: 4.5rem; }
  .site-nav { display: flex !important; position: static; background: none; padding: 0; inset: auto; z-index: auto; }
  .site-nav ul { flex-direction: row; gap: 2rem; align-items: center; }
  .site-nav a { font-size: .95rem; padding-block: 0; border: none; }
  .nav-toggle { display: none; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { align-items: start; }
  .hero { padding-block: 6rem 5rem; }
}
