@font-face {
    font-family: 'Satoshi';
    src: url('../fonts/satoshi-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Chillax';
    src: url('../fonts/chillax-300.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Chillax';
    src: url('../fonts/chillax-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --noir: #000000;
    --bleu: #67B2FF;
    --bleu-clair: #8fc7ff;
    --blanc: #F8FAFC;
    --gris1: #111214;
    --gris2: #9AA3AF;
    --title1: 'Satoshi', sans-serif;
    --text: 'Chillax', sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--noir);
    color: var(--blanc);
    font-family: var(--text);
    font-weight: 400;
    line-height: 1.6;
}

.legal-topbar {
    display: flex;
    justify-content: center;
    padding: 30px 20px 0;
}

.legal-topbar .navbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 40px;
    background: rgba(21, 21, 23, 0.77);
    border: 0.5px solid var(--bleu);
    border-radius: 20px;
    padding: 16px 30px;
}

.legal-topbar .logo a {
    display: block;
    line-height: 0;
}

.legal-topbar .logo img {
    height: 32px;
    display: block;
}

.btn {
    background: var(--bleu);
    color: var(--noir);
    border: none;
    padding: 10px 12px;
    border-radius: 5px;
    font-family: var(--text);
    font-weight: 300;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(90, 149, 214, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.legal-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 32px 120px;
}

/* Le footer prend le relais : inutile de garder 120px de vide avant lui. */
.legal-content--footer {
    padding-bottom: 40px;
}

.legal-content h1 {
    font-family: var(--title1);
    font-weight: 500;
    font-size: 2rem;
    margin-bottom: 8px;
}

.legal-content .legal-maj {
    color: var(--gris2);
    font-size: 0.85rem;
    margin-bottom: 40px;
}

.legal-content h2 {
    font-family: var(--title1);
    font-weight: 500;
    font-size: 1.2rem;
    margin-top: 36px;
}

.legal-content p {
    color: var(--gris2);
}

/* ---- Retour, dans la navbar ----
   Repris a l'identique des liens de navigation de la landing (.nav-links a de
   style.css) : simple texte bleu, souligne qui se deploie au survol. TELECHARGER
   reste ainsi le seul bouton de la barre, donc le seul dominant. */
.legal-nav-link {
    position: relative;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    color: var(--bleu);
    font-size: 14px;
    font-family: var(--text);
    font-weight: 300;
    transition: color 0.25s ease;
}

.legal-nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 1px;
    background-color: var(--bleu-clair);
    transition: width 0.3s ease;
}

.legal-nav-link:hover {
    color: var(--bleu-clair);
}

.legal-nav-link:hover::after {
    width: 100%;
}

/* ---- Bloc d'identite en tete de document ---- */
.legal-identity {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(103, 178, 255, 0.35);
    margin-bottom: 40px;
}

.legal-identity .legal-identity-mark img {
    width: 96px;
    display: block;
}

.legal-identity .legal-identity-text {
    text-align: right;
    margin-left: auto;
}

.legal-identity .legal-identity-name {
    font-family: var(--title1);
    font-weight: 500;
    font-size: 1.9rem;
    letter-spacing: 0.04em;
    margin: 0;
}

.legal-identity .legal-identity-form {
    color: var(--gris2);
    font-size: 0.85rem;
    margin: 6px 0 0;
}

.legal-identity .legal-identity-doc {
    font-style: italic;
    font-size: 1.05rem;
    margin: 10px 0 0;
}

.legal-identity .legal-identity-contact {
    margin: 10px 0 0;
    font-size: 0.95rem;
}

/* ---- Titres et corps ---- */
.legal-content h2 {
    margin-bottom: 10px;
}

.legal-content h3 {
    font-family: var(--title1);
    font-weight: 500;
    font-size: 1rem;
    margin-top: 28px;
    margin-bottom: 8px;
}

.legal-content p {
    margin: 0 0 1em;
}

.legal-content strong {
    color: var(--blanc);
    font-weight: 400;
}

.legal-content a {
    color: var(--bleu);
    text-decoration: none;
    border-bottom: 1px solid rgba(103, 178, 255, 0.4);
}

.legal-content a:hover {
    border-bottom-color: var(--bleu);
}

.legal-content .legal-lead {
    color: var(--blanc);
}

.legal-content .legal-closing {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(154, 163, 175, 0.25);
}

/* ---- Listes : puces rondes bleues ---- */
.legal-content ul {
    list-style: none;
    padding-left: 1.6em;
    margin: 1em 0 1.4em;
}

.legal-content ul li {
    position: relative;
    color: var(--gris2);
    margin-bottom: 0.5em;
}

.legal-content ul li::before {
    content: "•";
    position: absolute;
    left: -1.1em;
    color: var(--bleu);
    font-size: 1.15em;
    line-height: 1.35;
}

/* ---- Tableau des durees de conservation ---- */
.legal-table-wrap {
    overflow-x: auto;
    margin: 1.4em 0 1.6em;
}

.legal-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    color: var(--gris2);
}

.legal-content table th {
    font-family: var(--title1);
    font-weight: 500;
    color: var(--blanc);
    text-align: left;
    padding: 10px 14px 10px 0;
    border-top: 1.5px solid var(--blanc);
    border-bottom: 1px solid rgba(248, 250, 252, 0.6);
}

.legal-content table td {
    padding: 12px 14px 12px 0;
    vertical-align: top;
    border-bottom: 1px solid rgba(154, 163, 175, 0.18);
}

.legal-content table tr:last-child td {
    border-bottom: 1.5px solid var(--blanc);
}

.legal-content table td:last-child,
.legal-content table th:last-child {
    padding-right: 0;
    width: 38%;
}

/* ---- Encadres ---- */
.legal-callout {
    border: 1px solid var(--bleu);
    border-radius: 10px;
    padding: 20px 24px;
    margin: 1.6em 0;
    color: var(--gris2);
    font-size: 0.95rem;
}

.legal-callout p {
    margin: 0 0 0.9em;
}

.legal-callout p:last-child {
    margin-bottom: 0;
}

.legal-callout--soft {
    background: rgba(103, 178, 255, 0.07);
    font-size: 1rem;
}

/* ---- Separateur de partie ----
   Equivalent de la macro \partie du LaTeX : titre centre encadre de
   deux filets bleus. Le \newpage qui l'accompagne n'a pas d'objet ici. */
.legal-part {
    margin: 3.2em 0 2.2em;
    border-top: 1px solid var(--bleu);
    border-bottom: 1px solid var(--bleu);
    padding: 18px 0;
    text-align: center;
}

.legal-part h2 {
    margin: 0;
    font-size: 1.35rem;
}

/* ---- Listes numerotees et alphabetiques ----
   Les compteurs reproduisent les etiquettes LaTeX : "1." pour enumerate,
   "a)" pour enumerate[label=\alph*)]. Meme bleu que les puces rondes. */
.legal-content ol {
    list-style: none;
    padding-left: 2.2em;
    margin: 1em 0 1.4em;
    counter-reset: legal-item;
}

.legal-content ol li {
    position: relative;
    color: var(--gris2);
    margin-bottom: 0.5em;
    counter-increment: legal-item;
}

.legal-content ol li::before {
    content: counter(legal-item) ".";
    position: absolute;
    left: -1.9em;
    color: var(--bleu);
}

.legal-content ol.legal-list-alpha li::before {
    content: counter(legal-item, lower-alpha) ")";
}

/* ---- Case a cocher ----
   Equivalent de la macro \case : carre vide, dessine plutot qu'ecrit avec
   un caractere, toutes les polices du site n'ayant pas le glyphe U+2610. */
.legal-case {
    display: inline-block;
    width: 0.72em;
    height: 0.72em;
    margin-right: 0.45em;
    border: 1px solid var(--gris2);
    border-radius: 2px;
    vertical-align: baseline;
}

/* ---- Pointilles a remplir ----
   Equivalent de \dotfill dans le formulaire de retractation. */
.legal-dots {
    display: inline-block;
    min-width: 8em;
    flex: 1;
    border-bottom: 1px dotted var(--gris2);
    transform: translateY(-0.25em);
}

/* Tableau des offres : trois colonnes, le prix tient dans peu de place. */
.legal-table--offres td:last-child,
.legal-table--offres th:last-child {
    width: 15%;
    text-align: right;
    white-space: nowrap;
}

/* =============================================================
   FOOTER — repris de style.css (landing), allege des colonnes
   Reseaux / Sections / Legal, sans interet sur une page legale.
   Classes identiques a index.html pour rester une seule ecriture.
   ============================================================= */
.main-footer {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 32px 40px 32px;
    background-color: transparent;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 28px;
}

.footer-col {
    flex: 0 1 auto;
    min-width: 160px;
}

.footer-col.brand-col {
    flex: 2;
    max-width: 640px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-logo {
    flex-shrink: 0;
}

.footer-logo img {
    height: 40px;
    display: block;
}

.footer-desc {
    max-width: 360px;
    color: var(--blanc);
    font-weight: 300;
    font-size: 14px;
    line-height: 1.6;
    font-family: var(--text);
}

.footer-col.top-col {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-width: auto;
}

.btn-top {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--bleu);
}

.btn-top svg {
    width: 36px;
    height: 36px;
    padding: 8px;
    border: 0.5px solid var(--bleu);
    border-radius: 50%;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.btn-top:hover svg {
    transform: translateY(-3px);
    border-color: var(--bleu-clair);
}

.btn-top span {
    font-size: 12px;
    letter-spacing: 0.1em;
    font-family: var(--text);
    transition: color 0.25s ease;
}

.btn-top:hover span {
    color: var(--bleu-clair);
}

.footer-divider {
    border: none;
    border-top: 0.5px solid var(--blanc);
    margin-bottom: 60px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.copyright, .made-in-france {
    color: var(--blanc);
    font-size: 13px;
    font-family: var(--text);
}

.made-in-france {
    display: flex;
    align-items: center;
    gap: 12px;
}

.flag {
    display: flex;
    width: 24px;
    height: 16px;
    border-radius: 2px;
    overflow: hidden;
}

.flag .blue { flex: 1; background-color: #002395; }
.flag .white { flex: 1; background-color: #ffffff; }
.flag .red { flex: 1; background-color: #ed2939; }

@media (max-width: 600px) {
    .legal-topbar {
        padding: 20px 10px 0;
    }

    .legal-topbar .navbar {
        gap: 10px;
        padding: 12px 14px;
    }

    .legal-topbar .logo img {
        height: 26px;
    }

    .legal-topbar .btn {
        font-size: 13px;
        padding: 9px 11px;
    }

    .legal-nav-link {
        font-size: 13px;
    }


    .main-footer {
        padding: 36px 20px 28px 20px;
    }


    .footer-top {
        flex-direction: column;
        gap: 0;
        margin-bottom: 32px;
    }

    .footer-col.brand-col {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        max-width: 100%;
        margin-bottom: 28px;
    }

    .footer-logo img {
        height: 32px;
    }

    .footer-desc {
        max-width: 100%;
        font-size: 14px;
        line-height: 1.5;
    }

    .footer-col.top-col {
        justify-content: flex-start;
        padding: 0;
    }

    .footer-divider {
        margin-bottom: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .legal-content {
        padding: 40px 20px 90px;
    }

    .legal-identity {
        flex-direction: column;
        align-items: flex-start;
    }

    .legal-identity .legal-identity-text {
        text-align: left;
        margin-left: 0;
    }

    .legal-identity .legal-identity-name {
        font-size: 1.5rem;
    }
}

@media print {
    .legal-topbar, .main-footer { display: none; }
    body { background: #ffffff; color: #000000; }
    .legal-content { max-width: none; padding: 0; }
    .legal-content .legal-maj, .legal-content p, .legal-content ul li { color: #333333; }
    .legal-content strong, .legal-content .legal-lead { color: #000000; }
    .legal-content a { color: #000000; border-bottom: none; }
    .legal-identity { border-bottom-color: #000000; }
    .legal-content table { color: #333333; }
    .legal-content table th { color: #000000; border-top-color: #000000; border-bottom-color: #000000; }
    .legal-content table tr:last-child td { border-bottom-color: #000000; }
    .legal-callout { border-color: #3383FF; }
    .legal-callout--soft { background: #F2F6FC; }
    .legal-content h2, .legal-content h3 { break-after: avoid; page-break-after: avoid; }
    .legal-callout, .legal-table-wrap { break-inside: avoid; page-break-inside: avoid; }
}


/* Téléphone : les contours de 0,5 px perdaient un trait (gauche ou du haut)
   sur iPhone, Safari arrondissant ce demi-pixel selon la position du cadre à
   l'écran. 1 px est toujours tracé, dans les mêmes couleurs. Les traits simples
   (séparateurs) restent fins. */
@media (max-width: 768px) {
    .legal-topbar .navbar,
    .btn-top svg {
        border-width: 1px;
    }
}
