/* =========================================================================
   GoProf — feuille de style du portail (charte graphique v1)
   ========================================================================= */

/* --- Polices (auto-hébergées : la CSP n'autorise que 'self') --- */
@font-face {
    font-family: "Sora";
    src: url("../fonts/sora-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 800;
    font-display: swap;
}
@font-face {
    font-family: "Manrope";
    src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
    font-weight: 200 800;
    font-display: swap;
}
@font-face {
    font-family: "JetBrains Mono";
    src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

/* --- Jetons de la charte --- */
:root {
    --magenta: #B81FC0;        /* logo, boutons, liens */
    --magenta-fonce: #9A17A1;  /* survol, pressé */
    --magenta-doux: #F6E4F7;   /* fonds d'accent */
    --magenta-vif: #DE2BE5;    /* accent décoratif uniquement, jamais pour du texte */
    --encre: #1E1B2E;
    --gris: #5E5A6B;
    --bordure: #E6E1EA;
    --fond: #FAF8FC;
    --surface: #FFFFFF;

    --succes: #1F8A5B;   --succes-fond: #E3F4EC;
    --erreur: #C62E3A;   --erreur-fond: #FBE6E8;
    --alerte: #B26A00;   --alerte-fond: #FDF1DC;
    --info: #2563A8;     --info-fond: #E3EDF8;

    --font-titre: "Sora", system-ui, sans-serif;
    --font-texte: "Manrope", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;

    --rayon: 10px;
    --rayon-carte: 16px;
    --ombre: 0 1px 2px rgba(30, 27, 46, .04), 0 4px 16px rgba(30, 27, 46, .06);
    --ombre-survol: 0 2px 4px rgba(30, 27, 46, .05), 0 12px 32px rgba(30, 27, 46, .10);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--fond);
    color: var(--encre);
    font-family: var(--font-texte);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

h1, h2, h3, h4 {
    font-family: var(--font-titre);
    line-height: 1.2;
    letter-spacing: -.02em;
    margin: 0;
}

p { margin: 0; }

img, svg { display: block; }

a { color: var(--magenta); text-decoration: underline; text-underline-offset: .18em; }
a:hover { color: var(--magenta-fonce); }

:focus-visible {
    outline: 2px solid var(--magenta);
    outline-offset: 2px;
    border-radius: 4px;
}

.wrap {
    width: 100%;
    max-width: 1120px;
    margin-inline: auto;
    padding-inline: 16px;
}
@media (min-width: 640px) { .wrap { padding-inline: 24px; } }

.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 10;
    padding: 8px 14px;
    background: var(--surface);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
}
.skip-link:focus { top: 12px; }

.icon { width: 24px; height: 24px; flex-shrink: 0; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* --- En-tête --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--bordure);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--encre);
    text-decoration: none;
}
.brand:hover { color: var(--encre); }
.brand__name {
    font-family: var(--font-titre);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -.02em;
}
.brand--light, .brand--light:hover { color: #fff; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
    padding: 8px 12px;
    border-radius: var(--rayon);
    color: var(--gris);
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
}
.site-nav a:hover { color: var(--magenta); background: var(--fond); }
.site-nav a[aria-current="page"] { color: var(--magenta); background: var(--magenta-doux); }
@media (max-width: 559px) { .site-nav__secondary { display: none; } }

/* --- Boutons (charte §05) --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 20px;
    border: 1.5px solid transparent;
    border-radius: var(--rayon);
    font-family: var(--font-texte);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
}
@media (min-width: 768px) { .btn { min-height: 40px; } }
.btn .icon { width: 18px; height: 18px; }

.btn--primaire { background: var(--magenta); color: #fff; }
.btn--primaire:hover { background: var(--magenta-fonce); color: #fff; }

.btn--secondaire { background: var(--surface); color: var(--magenta); border-color: var(--magenta); }
.btn--secondaire:hover { color: var(--magenta-fonce); border-color: var(--magenta-fonce); }

.btn--discret { padding-inline: 4px; color: var(--magenta); background: none; }
.btn--discret:hover { color: var(--magenta-fonce); }

/* --- Sections --- */
.section { padding-block: 56px; }
.section + .section { padding-top: 0; }

.eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--magenta);
    font-family: var(--font-mono);
    font-size: .8rem;
    letter-spacing: .02em;
}

.section__head { max-width: 640px; margin-bottom: 24px; }
.section__head h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.75rem); }
.section__head p { margin-top: 8px; color: var(--gris); }

/* --- Accueil : bandeau --- */
.hero { padding-block: 56px 48px; }
@media (min-width: 768px) { .hero { padding-block: 88px 64px; } }
.hero h1 {
    max-width: 18ch;
    font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem);
    font-weight: 700;
}
.hero h1 em {
    font-style: normal;
    color: var(--magenta);
}
.hero__lead {
    max-width: 56ch;
    margin-top: 18px;
    color: var(--gris);
    font-size: 1.125rem;
}

/* --- Grilles --- */
.grid { display: grid; gap: 20px; }
.grid--ressources { grid-template-columns: 1fr; }
.grid--outils { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--autres { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
@media (min-width: 900px) {
    .grid--ressources { grid-template-columns: 3fr 2fr; }
}

/* --- Cartes --- */
/* Toute la carte est cliquable via le ::after du lien du titre (un seul lien par carte). */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-carte);
    box-shadow: var(--ombre);
    transition: box-shadow .2s, border-color .2s, transform .2s;
}
.card:hover {
    border-color: #D9CCE0;
    box-shadow: var(--ombre-survol);
    transform: translateY(-2px);
}
.card:has(.card__link:focus-visible) {
    outline: 2px solid var(--magenta);
    outline-offset: 2px;
}
.card__link { color: inherit; text-decoration: none; }
.card__link:hover { color: inherit; }
.card__link:focus-visible { outline: none; }
.card__link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.card__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--magenta-doux);
    color: var(--magenta);
}
.card__icon .icon { width: 26px; height: 26px; }

.card__host {
    color: var(--gris);
    font-family: var(--font-mono);
    font-size: .78rem;
}

.card__title { font-size: 1.25rem; font-weight: 700; }
.card__subtitle {
    display: block;
    margin-top: 2px;
    color: var(--gris);
    font-family: var(--font-texte);
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: 0;
}
.card__text { color: var(--gris); }

.card__cta {
    align-self: flex-start;
    margin-top: auto;
    padding-top: 8px;
}
.card__cta .icon { transition: transform .2s; }
.card:hover .card__cta .icon { transform: translateX(3px); }
/* Le CTA reproduit l'état de survol du bouton quand on survole la carte. */
.card:hover .btn--primaire { background: var(--magenta-fonce); }
.card:hover .btn--secondaire { color: var(--magenta-fonce); border-color: var(--magenta-fonce); }
.card:hover .btn--discret { color: var(--magenta-fonce); }

/* Carte principale (cours) : zone mise en avant, filet décoratif magenta vif. */
.card--vedette {
    padding: 28px;
    border-top: 4px solid var(--magenta-vif);
}
@media (min-width: 768px) { .card--vedette { padding: 36px; } }
.card--vedette .card__title { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem); }
.card--vedette .card__text { font-size: 1.05rem; max-width: 52ch; }
.card--vedette .card__icon { width: 56px; height: 56px; border-radius: 14px; }
.card--vedette .card__icon .icon { width: 30px; height: 30px; }

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tags li {
    padding: 4px 10px;
    border: 1px solid var(--bordure);
    border-radius: 999px;
    background: var(--fond);
    color: var(--encre);
    font-size: .85rem;
    font-weight: 600;
}

/* Cartes horizontales (boutique, cours particuliers). */
.card--ligne { flex-direction: row; align-items: flex-start; gap: 18px; }
.card--ligne .card__body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
@media (max-width: 479px) { .card--ligne { flex-direction: column; } }

/* --- Pied de page --- */
.site-footer {
    margin-top: 72px;
    padding-block: 40px 28px;
    background: var(--encre);
    color: #CFCAD8;
    font-size: .92rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--magenta-doux); }
.site-footer a:focus-visible { outline-color: #fff; }
.site-footer__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding-top: 20px;
}
.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* =========================================================================
   Page « Cours particuliers »
   ========================================================================= */
.page-hero { padding-block: 48px 40px; }
@media (min-width: 768px) { .page-hero { padding-block: 72px 56px; } }
.page-hero h1 {
    max-width: 22ch;
    font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.9rem);
}
.page-hero .hero__lead { margin-bottom: 28px; }

.atouts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.atout { padding: 24px; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon-carte); box-shadow: var(--ombre); }
.atout .card__icon { margin-bottom: 14px; }
.atout h3 { font-size: 1.1rem; margin-bottom: 6px; }
.atout p { color: var(--gris); }

.public {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.public li {
    position: relative;
    padding: 14px 18px 14px 44px;
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
}
.public li::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 1.45em;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--magenta-vif);
}

/* Zone de contact : seule zone en magenta doux de la page. */
.contact {
    display: grid;
    gap: 32px;
    padding: 28px 20px;
    background: var(--magenta-doux);
    border-radius: 20px;
}
@media (min-width: 640px) { .contact { padding: 40px; } }
@media (min-width: 900px) { .contact { grid-template-columns: 2fr 3fr; align-items: start; } }
.contact__intro h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.75rem); margin-bottom: 10px; }
.contact__intro p { color: var(--gris); }
.contact__intro p + p { margin-top: 12px; }
.contact__intro small { font-size: .88rem; }

.form {
    display: grid;
    gap: 18px;
    padding: 24px;
    background: var(--surface);
    border-radius: var(--rayon-carte);
    box-shadow: var(--ombre);
}
@media (min-width: 640px) { .form { padding: 28px; } }
.form__row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .95rem; }
.field label .facultatif { color: var(--gris); font-weight: 500; }
.field input,
.field textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1.5px solid var(--bordure);
    border-radius: var(--rayon);
    background: var(--surface);
    color: var(--encre);
    font: inherit;
    transition: border-color .15s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover,
.field textarea:hover { border-color: #CFC6D6; }
.field input:focus-visible,
.field textarea:focus-visible {
    border-color: var(--magenta);
    outline: 2px solid var(--magenta);
    outline-offset: 2px;
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--erreur); }
.field__error { color: var(--erreur); font-size: .88rem; }

/* Champ piège anti-robots : invisible pour les humains, ignoré par les lecteurs d'écran. */
.field--hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form .btn { justify-self: start; }

/* --- Messages (charte §06) --- */
.alert {
    margin-bottom: 24px;
    padding: 14px 18px;
    border-left: 4px solid;
    border-radius: var(--rayon);
    color: var(--encre);
}
.alert strong { display: block; }
.alert--succes { border-color: var(--succes); background: var(--succes-fond); }
.alert--succes strong { color: var(--succes); }
.alert--erreur { border-color: var(--erreur); background: var(--erreur-fond); }
.alert--erreur strong { color: var(--erreur); }
.alert--alerte { border-color: var(--alerte); background: var(--alerte-fond); }
.alert--alerte strong { color: var(--alerte); }

/* =========================================================================
   Pages juridiques (confidentialité, conditions d'utilisation)
   ========================================================================= */
.legal-meta { margin-top: 14px; color: var(--gris); font-size: .92rem; }

.legal {
    display: grid;
    gap: 32px;
    align-items: start;
}
@media (min-width: 960px) { .legal { grid-template-columns: 240px minmax(0, 1fr); gap: 56px; } }

.legal__toc {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-carte);
    font-size: .92rem;
}
@media (min-width: 960px) { .legal__toc { position: sticky; top: 92px; } }
.legal__toc h2 {
    margin-bottom: 10px;
    color: var(--gris);
    font-family: var(--font-mono);
    font-size: .78rem;
    font-weight: 400;
    letter-spacing: .02em;
}
.legal__toc ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.legal__toc li::marker { color: var(--gris); }
.legal__toc a { color: var(--encre); text-decoration: none; }
.legal__toc a:hover { color: var(--magenta); text-decoration: underline; }

.prose { max-width: 72ch; }
.prose > section + section { margin-top: 44px; }
.prose h2 {
    scroll-margin-top: 92px;
    margin-bottom: 14px;
    font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
}
.prose h3 { margin: 24px 0 8px; font-size: 1.08rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 12px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--magenta); }
.prose strong { font-weight: 700; }

.encadre {
    margin: 16px 0;
    padding: 16px 20px;
    background: var(--magenta-doux);
    border-radius: var(--rayon);
}
.encadre p:last-child, .encadre ul:last-child { margin-bottom: 0; }

.table-wrap {
    margin: 16px 0;
    overflow-x: auto;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    background: var(--surface);
}
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table-wrap th, .table-wrap td { padding: 10px 14px; text-align: left; vertical-align: top; }
.table-wrap th { background: var(--fond); font-weight: 700; white-space: nowrap; }
.table-wrap tr + tr td { border-top: 1px solid var(--bordure); }
.table-wrap code { font-family: var(--font-mono); font-size: .85em; }
