/* =============================================================================
   MIRROIR — socle commun de la vitrine publique indexable de la galaxie TE.
   Aux couleurs de TousEnsembles : variables copiées de public/packages/base.css
   (source de vérité de la charte). Toute page du mirroir inclut ce fichier ;
   aucune couleur en dur hors de ce :root, aucun CSS inline dans les pages.
   ============================================================================= */

:root {
    color-scheme: only light;

    /* --- Palette TE (reprise de base.css) --- */
    --primary: #2f827f;
    --primary-light: #e0f2f1;
    --primary-dark: #2f827f;
    --primary-darker: #256663;

    /* Fonds et textes */
    --bg-body: #f3f4f6;
    --bg-surface: #ffffff;
    --white: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;

    /* Gris */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-700: #374151;

    /* Layout */
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    /* Ombre portée teintée : --primary-darker (#256663 = rgb 37,102,99) à 14 %,
       teal de charte à opacité définie — pas une couleur ad hoc. */
    --shadow-lg: 0 12px 32px rgba(37, 102, 99, 0.14);
    --content-max: 1080px;

    --font-base: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-base);
    color: var(--text-primary);
    background: var(--bg-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Lien d'évitement — accessibilité clavier (RGAA) */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--primary-darker);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    z-index: 100;
    border-radius: 0 0 var(--border-radius) 0;
}

.skip-link:focus {
    left: 0;
}

:focus-visible {
    outline: 3px solid var(--primary-darker);
    outline-offset: 2px;
}

a {
    color: var(--primary-darker);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

/* --- En-tête de site --- */
.site-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--gray-200);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-block: 0.9rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.brand img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.brand span {
    color: var(--primary-darker);
}

/* --- Héros --- */
.hero {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--gray-200);
    color: var(--text-primary);
    padding-block: clamp(3rem, 8vw, 5.5rem);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.15;
    margin: 0 0 1rem;
    max-width: 18ch;
    color: var(--text-primary);
}

.hero h1 span {
    color: var(--primary-darker);
}

.hero .lead {
    font-size: clamp(1.1rem, 2.4vw, 1.4rem);
    max-width: 46ch;
    margin: 0 0 2rem;
    color: var(--text-secondary);
}

/* --- Boutons --- */
.btn {
    display: inline-block;
    font-weight: 700;
    text-decoration: none;
    padding: 0.9rem 1.75rem;
    border-radius: var(--border-radius);
    border: 2px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* CTA de marque TE : vert teal du logo (identique au bouton « Rejoindre la
   communauté » de la home — base.css .btn-primary : var(--primary-dark) /
   texte blanc, survol var(--primary-darker)). */
.btn-primary {
    background: var(--primary-dark);
    color: var(--white);
    border-color: var(--primary-dark);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: var(--primary-darker);
    border-color: var(--primary-darker);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* --- Sections --- */
section {
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
    color: var(--primary-darker);
    margin: 0 0 0.5rem;
}

.section-intro {
    color: var(--text-secondary);
    max-width: 54ch;
    margin: 0 0 2.5rem;
    font-size: 1.1rem;
}

/* --- Grille de garanties --- */
.guarantees {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    /* Grille de cartes (<ul class="guarantees"><li class="card">) : on retire
       la puce de liste par défaut et l'indentation qu'elle réserve. Portée
       limitée à cette liste — aucun reset global. */
    list-style: none;
    margin: 0;
    padding: 0;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
}

.card .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-darker);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.3rem;
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.card p {
    margin: 0;
    color: var(--text-secondary);
}

/* --- Bandeau d'appel final --- */
.cta-band {
    background: var(--primary-light);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    text-align: center;
}

.cta-band h2 {
    color: var(--primary-darker);
    font-size: clamp(1.5rem, 3.5vw, 2.1rem);
    margin: 0 0 0.75rem;
}

.cta-band p {
    color: var(--text-secondary);
    max-width: 48ch;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}

/* --- Pied de page --- */
.site-footer {
    background: var(--primary-darker);
    color: var(--primary-light);
    padding-block: 2.5rem;
    font-size: 0.95rem;
}

.site-footer a {
    color: var(--white);
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    justify-content: space-between;
    align-items: center;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

/* Respect des préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn {
        transition: none;
    }
}
