/*
Theme Name: CAP Avenir
Theme URI: https://cap-avenir.com
Author: CAP Avenir
Description: Thème du CFA CAP Avenir — Compétences Apprentissage Professionnalisation Avenir (sécurité privée, sécurité incendie, sécurité routière).
Version: 1.0.2
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: cap-avenir
*/

:root { --ca-radius: 14px; }
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
a { text-underline-offset: .18em; }

/* En-tête */
.ca-header { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.4) blur(8px); background: color-mix(in srgb, var(--wp--preset--color--base) 92%, transparent); border-bottom: 1px solid var(--wp--preset--color--line); }
.ca-logo { font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.ca-logo span { color: var(--wp--preset--color--accent); }
.ca-header .wp-block-navigation a { text-decoration: none; font-weight: 500; }
.ca-header .wp-block-navigation a:hover { color: var(--wp--preset--color--accent-dark); }

/* Pas d'espace entre l'en-tête, le contenu et le pied de page */
.wp-site-blocks > header, .wp-site-blocks > main, .wp-site-blocks > footer { margin-block-start: 0; }
.wp-block-post-content > .alignfull:first-child { margin-block-start: 0; }
.wp-block-post-content > .alignfull + .alignfull { margin-block-start: 0; }

/* Bandeau d'information */
.ca-notice { border-left: 4px solid var(--wp--preset--color--accent); }

/* Cartes */
.ca-card { border: 1px solid var(--wp--preset--color--line); border-radius: var(--ca-radius); background: var(--wp--preset--color--base); transition: transform .18s ease, box-shadow .18s ease; height: 100%; }
.ca-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -14px rgba(14,42,71,.35); }
.ca-card .ca-tag { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--wp--preset--color--accent-dark); background: var(--wp--preset--color--accent-soft); border-radius: 999px; padding: .2em .7em; }
.ca-card a { text-decoration: none; }
.ca-card h3 a { color: inherit; }
.ca-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--wp--preset--color--primary); color: #fff; font-weight: 700; }

/* Héros */
.ca-hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(245,158,11,.28), transparent 60%), linear-gradient(135deg, #0E2A47 0%, #12385E 60%, #0B2239 100%); }
.ca-hero h1 { letter-spacing: -.025em; }
.ca-chip { display: inline-block; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: .25em .8em; font-size: .85rem; }

/* Fiches formation */
.ca-facts { border: 1px solid var(--wp--preset--color--line); border-radius: var(--ca-radius); overflow: hidden; }
.ca-facts table { margin: 0; }
.ca-facts td { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: .7em 1em; vertical-align: top; }
.ca-facts tr:last-child td { border-bottom: 0; }
.ca-facts td:first-child { width: 34%; font-weight: 600; background: var(--wp--preset--color--surface); }

/* Étapes */
.ca-step { counter-increment: step; }
.ca-steps { counter-reset: step; }
.ca-step h3::before { content: counter(step); display: inline-grid; place-items: center; width: 1.8em; height: 1.8em; margin-right: .5em; border-radius: 50%; background: var(--wp--preset--color--accent); color: var(--wp--preset--color--primary); font-size: .85em; }

/* Pied de page */
.ca-footer a { color: inherit; text-decoration: none; }
.ca-footer a:hover { text-decoration: underline; }

@media (max-width: 781px) {
  .ca-hero h1 { font-size: 2.1rem !important; }
  .ca-facts td:first-child { width: 42%; }
}
@media (prefers-reduced-motion: reduce) { .ca-card { transition: none; } html { scroll-behavior: auto; } }
