/* Polices auto-hébergées (RGPD + suppression du render-blocking Google Fonts) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter-Gz7AlRl.woff2") format('woff2');
}

/* Accessibilite : skip-link visible au focus pour navigation clavier (WCAG 2.4.1).
   Le masquage repose sur la taille et le clip, pas sur `top: -40px` : une feuille
   chargee plus tard (home.css et son `body.gradient-page > *`) peut redefinir
   `position` a specificite egale et remettre le lien dans le flux, ou il devient
   visible en haut de page. Avec ce motif, meme repositionne, il reste invisible. */
body > .ez-skip-link,
.ez-skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10000;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    background: var(--primary-surface);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 8px 0;
}
body > .ez-skip-link:focus,
.ez-skip-link:focus {
    width: auto;
    height: auto;
    padding: 8px 16px;
    overflow: visible;
    clip-path: none;
    outline: 2px solid #fff;
    outline-offset: -4px;
}
/* Focus visible global pour navigation clavier */
:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: 4px;
}

i.fa.fa-fw, i.fab.fa-fw, i.far.fa-fw, i.fas.fa-fw {
    width: 1.25em;
    text-align: center
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important
    }
}

@media (min-width: 769px) {
    .show-mobile {
        display: none !important
    }
}

/* Les tokens (:root) et le theme sombre vivent desormais dans tokens.css :
   aucune palette ne doit etre redeclaree ici. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

/* Police de l'application. La vitrine surcharge avec Plus Jakarta Sans
   (home.css, charge uniquement par public_base.html.twig). */
body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
    line-height: 1.6;
    background: var(--bg-secondary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color .3s ease, color .3s ease
}

body > .container, body > .page-container, body > main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column
}

.page-content {
    flex: 1 0 auto
}

footer {
    margin-top: auto;
    flex-shrink: 0
}

.container {
    max-width: 1200px
}

.container, .container-sm {
    margin: 0 auto;
    padding: 20px
}

.container-sm {
    max-width: 900px
}

.container-xs {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px
}

.btn-block {
    width: 100%
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 32px;
    transition: var(--transition)
}

.back-button:hover {
    transform: translateX(-4px)
}

.back-button-light {
    color: #fff;
    background: hsla(0, 0%, 100%, .1);
    padding: 12px 20px;
    border-radius: var(--radius-md)
}

.back-button-light:hover {
    background: hsla(0, 0%, 100%, .2)
}

.card-sm {
    padding: 24px;
    border-radius: var(--radius-lg)
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
    font-size: 14px
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition)
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, .1)
}

textarea.form-control {
    min-height: 120px;
    resize: vertical
}

select.form-control {
    cursor: pointer;
}

.form-required {
    color: var(--danger)
}

/* Pas de `color` ici : les titres heritent de leur conteneur, sinon une section
   en .text-white (vitrine, en-tetes sur degrade) affiche un titre illisible. */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em
}

/* L'effet "texte en degrade" n'est plus applique d'office a tous les h1/h2 :
   sur un fond colore il rendait le titre illisible, ce qui obligeait chaque
   page a le neutraliser a coups de !important. Il reste disponible via la
   classe utilitaire .text-gradient. */
h1 {
    font-size: 48px;
    margin-bottom: 24px
}

h2 {
    font-size: 36px;
    margin-bottom: 20px
}

h3 {
    font-size: 28px;
    margin-bottom: 16px;
    color: var(--primary-dark)
}

h4 {
    font-size: 24px
}

h4, h5 {
    margin-bottom: 12px
}

h5 {
    font-size: 20px
}

h6 {
    font-size: 18px;
    margin-bottom: 8px
}

/* Pas de `color` impose ici : un paragraphe place sur fond sombre (pied de page
   de la vitrine, bandeaux degrades) heritait de gray-700 et devenait illisible
   (1.34:1). La couleur vient du conteneur. */
p {
    margin-bottom: 16px;
    line-height: 1.8
}

.text-primary {
    color: var(--primary) !important
}

.text-secondary {
    color: var(--secondary) !important
}

.text-accent {
    color: var(--accent-purple) !important
}

.text-muted {
    color: var(--gray-500) !important
}

.text-gradient {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.text-center {
    text-align: center
}

.text-right {
    text-align: right
}

.text-left {
    text-align: left
}

.mt-4 {
    margin-top: 16px
}

.mb-4 {
    margin-bottom: 16px
}

.mt-8 {
    margin-top: 32px
}

.mb-8 {
    margin-bottom: 32px
}

.p-4 {
    padding: 16px
}

.p-8 {
    padding: 32px
}

.flex {
    display: flex
}

.flex-col {
    flex-direction: column
}

.items-center {
    align-items: center
}

.justify-center {
    justify-content: center
}

.gap-4 {
    gap: 16px
}

/* Grande variante du .spinner defini dans components.css */
.spinner-lg {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-100);
    border-top-color: var(--primary);
}

@media (max-width: 768px) {
    h1 {
        font-size: 32px
    }

    h2 {
        font-size: 28px
    }

    h3 {
        font-size: 24px
    }

    .card {
        padding: 24px
    }

    .container, .container-sm, .container-xs {
        padding: 16px
    }
}

/* La banniere de consentement vit desormais dans styles/cookie_consent.css :
   elle doit etre chargee aussi par les pages autonomes (profil public, widget
   embarque), qui n'importent pas cette feuille. Cf. assets/consent.js. */

/* ===== Pages d'erreur ===== */
.error-page {
    background: var(--bg-secondary);
}

.error-page__inner {
    max-width: 480px;
}

.error-page__code {
    font-size: 72px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== Pages legales et informatives ===== */
.legal-page {
    background: var(--bg-secondary);
}

.legal-card h2 {
    font-size: 22px;
    margin-top: 32px;
    margin-bottom: 12px;
}

.legal-card h2:first-of-type {
    margin-top: 0;
}

.legal-card h3 {
    font-size: 18px;
    margin-top: 24px;
    margin-bottom: 8px;
}

.legal-card p,
.legal-card li {
    color: var(--text-secondary);
    line-height: 1.8;
}

.legal-card ul,
.legal-card ol {
    padding-left: 22px;
    margin-bottom: 16px;
}

.legal-card table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

.legal-card th,
.legal-card td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-primary);
    text-align: left;
    vertical-align: top;
}

/* Repli des animations d'apparition.
   AOS applique une opacite nulle a tout element porteur de data-aos ; si le
   module ne demarre pas, la page reste blanche. Ce bloc rend le contenu quand
   le visiteur a demande a reduire les animations - AOS se desactive alors et ne
   retirera jamais l'opacite lui-meme. */
@media (prefers-reduced-motion: reduce) {
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
