/* ============================================================================
   Centre d'aide TinyLink — feuille de style autonome.
   Palette reprise de l'application (css/settings.css) pour que les deux se
   ressemblent, mais recopiée ici : le centre d'aide ne dépend d'aucun fichier
   de l'app. Thème clair par défaut, sombre suivant la préférence système.
   ========================================================================= */

:root {
    --fond: #F0F0F0;
    --carte: #FFFFFF;
    --ligne: #f6f6f6;
    --bordure: #e6e6e6;
    --texte: #212121;
    --texte-doux: #6b6b6b;
    --lateral: #212121;
    --lateral-texte: #FFFFFF;
    --lateral-doux: #a5a5a5;
    --lateral-actif: #333333;
    --bleu: #1E90FF;
    --bleu-fonce: #0f7ae5;
    --bleu-10: #1E90FF17;
    --rouge: #ee5253;
    --rayon: 12px;
    --rayon-s: 8px;
    --ombre: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
    --transition: .2s ease;
}

@media (prefers-color-scheme: dark) {
    :root {
        --fond: #181818;
        --carte: #212121;
        --ligne: #2f2f2f;
        --bordure: #333333;
        --texte: #FFFFFF;
        --texte-doux: #a5a5a5;
        --lateral: #101010;
        --lateral-actif: #2a2a2a;
        --bleu-10: #1E90FF2E;
        --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background-color: var(--fond);
    color: var(--texte);
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--bleu); }

.saut-contenu {
    position: absolute;
    left: -9999px;
}
.saut-contenu:focus {
    left: 1rem;
    top: 1rem;
    z-index: 100;
    background: var(--carte);
    padding: .75rem 1rem;
    border-radius: var(--rayon-s);
}

.page {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 100vh;
}

/* ---------------------------------------------------------- Barre latérale */

.lateral {
    background-color: var(--lateral);
    color: var(--lateral-texte);
    padding: 1.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.marque {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    text-decoration: none;
    color: inherit;
}

.marque .logo {
    display: block;
    width: 150px;
    height: auto;
}

.marque-sous {
    font-size: .8rem;
    color: var(--lateral-doux);
}

.recherche {
    display: flex;
    align-items: center;
    gap: .5rem;
    background-color: rgba(255, 255, 255, .08);
    border-radius: var(--rayon-s);
    padding: .5rem .75rem;
}

.recherche i { color: var(--lateral-doux); font-size: .85rem; }

.recherche input {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    outline: none;
    color: var(--lateral-texte);
    font-family: inherit;
    font-size: .875rem;
}

.recherche input::placeholder { color: var(--lateral-doux); }

.sommaire { flex: 1; }

.sommaire-bloc { margin-bottom: .35rem; }

.sommaire-titre {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .6rem;
    border-radius: var(--rayon-s);
    color: var(--lateral-texte);
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    transition: background-color var(--transition);
}

.sommaire-titre i { width: 1.1rem; text-align: center; color: var(--lateral-doux); }
.sommaire-titre:hover { background-color: var(--lateral-actif); }
.sommaire-titre.actif { background-color: var(--lateral-actif); }
.sommaire-titre.actif i { color: var(--bleu); }

.sommaire ul {
    list-style: none;
    margin: .15rem 0 .5rem;
    padding: 0 0 0 2.1rem;
    display: none;
}

.sommaire-bloc.ouvert ul { display: block; }

.sommaire ul a {
    display: block;
    padding: .3rem .5rem;
    border-radius: 6px;
    color: var(--lateral-doux);
    text-decoration: none;
    font-size: .85rem;
    transition: color var(--transition), background-color var(--transition);
}

.sommaire ul a:hover { color: var(--lateral-texte); background-color: var(--lateral-actif); }
.sommaire ul a.actif { color: var(--lateral-texte); background-color: var(--bleu); }

.sommaire-vide {
    color: var(--lateral-doux);
    font-size: .85rem;
    padding: .5rem .6rem;
}

.lateral-pied {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    border-top: solid 1px rgba(255, 255, 255, .1);
    padding-top: 1rem;
}

.langues { display: flex; gap: .35rem; }

.langues a {
    padding: .2rem .55rem;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--lateral-doux);
}

.langues a.actif { background-color: var(--lateral-actif); color: var(--lateral-texte); }

/* ---------------------------------------------------------------- Contenu */

.contenu {
    padding: 3rem clamp(1.25rem, 4vw, 3.5rem);
    width: 100%;
    max-width: 100%;
}

/* Le texte garde une longueur de ligne lisible, mais captures, listes d'articles et
   grilles occupent toute la largeur disponible. */
.entete .baseline,
.article > p,
.etapes,
.puces,
.encadre {
    max-width: 78ch;
}

.fil {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .825rem;
    color: var(--texte-doux);
    margin-bottom: 1.25rem;
}

.fil a { color: var(--texte-doux); text-decoration: none; }
.fil a:hover { color: var(--bleu); }
.fil i { font-size: .6rem; }

.entete { margin-bottom: 2rem; }

.entete h1 {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 .5rem;
}

.entete .baseline {
    color: var(--texte-doux);
    font-size: 1.05rem;
    margin: 0;
}

.entete-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--rayon-s);
    background-color: var(--bleu-10);
    color: var(--bleu);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* Accueil : une carte par espace */

.grille-sections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
}

.carte-section {
    background-color: var(--carte);
    border: solid 1px var(--bordure);
    border-radius: var(--rayon);
    padding: 1.25rem;
    text-decoration: none;
    color: var(--texte);
    display: flex;
    flex-direction: column;
    gap: .4rem;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.carte-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--ombre);
    border-color: var(--bleu);
}

.carte-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: var(--rayon-s);
    background-color: var(--bleu-10);
    color: var(--bleu);
    margin-bottom: .35rem;
}

.carte-section h2 { font-size: 1.05rem; margin: 0; font-weight: 600; }
.carte-section p { margin: 0; color: var(--texte-doux); font-size: .875rem; flex: 1; }

.carte-compte {
    font-size: .75rem;
    color: var(--texte-doux);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Sommaire d'une catégorie */

.liste-articles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }

.liste-articles a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background-color: var(--carte);
    border: solid 1px var(--bordure);
    border-radius: var(--rayon);
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--texte);
    transition: border-color var(--transition), transform var(--transition);
}

.liste-articles a:hover { border-color: var(--bleu); transform: translateX(2px); }
.liste-articles strong { display: block; font-weight: 600; }
.liste-articles em { display: block; font-style: normal; color: var(--texte-doux); font-size: .875rem; }
.liste-articles i { color: var(--bleu); }

/* Article */

.article h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2.25rem 0 .75rem;
}

.article p { margin: 0 0 1rem; }

.capture {
    margin: 0 0 1.5rem;
}

.capture img {
    max-width: 100%;
    display: block;
    border-radius: var(--rayon);
    border: solid 1px var(--bordure);
    box-shadow: var(--ombre);
}

.capture figcaption {
    margin-top: .6rem;
    font-size: .825rem;
    color: var(--texte-doux);
    text-align: center;
}

.etapes {
    counter-reset: etape;
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.etapes li {
    counter-increment: etape;
    position: relative;
    padding-left: 2.75rem;
    min-height: 1.9rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
}

.etapes li::before {
    content: counter(etape);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    background-color: var(--bleu);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.puces { margin: 0 0 1.5rem; padding-left: 1.25rem; }
.puces li { margin-bottom: .35rem; }

/* Représentation des éléments de l'interface dans le texte */

.etapes button,
.article button,
.puces button {
    font-family: inherit;
    font-size: .8rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 6px;
    border: none;
    background-color: var(--ligne);
    color: var(--texte);
    cursor: default;
    vertical-align: middle;
}

button.btn-principal-inline { background-color: var(--bleu); color: #fff; }
button.btn-danger-inline { background-color: var(--rouge); color: #fff; }

.article kbd {
    font-family: inherit;
    font-size: .8rem;
    background-color: var(--ligne);
    border: solid 1px var(--bordure);
    border-radius: 6px;
    padding: 1px 7px;
}

.encadre {
    background-color: var(--bleu-10);
    border-radius: var(--rayon);
    padding: 1.1rem 1.25rem;
    margin: 2rem 0 0;
}

.encadre h3 {
    margin: 0 0 .5rem;
    font-size: .95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.encadre h3 i { color: var(--bleu); }
.encadre p { margin: 0 0 .5rem; font-size: .9rem; }
.encadre p:last-child { margin-bottom: 0; }

/* Navigation entre articles */

.navigation-articles {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: solid 1px var(--bordure);
}

.nav-article {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    color: var(--texte);
    background-color: var(--carte);
    border: solid 1px var(--bordure);
    border-radius: var(--rayon);
    padding: .85rem 1.1rem;
    max-width: 48%;
    transition: border-color var(--transition);
}

.nav-article:hover { border-color: var(--bleu); }
.nav-article.suivant { margin-left: auto; text-align: right; }
.nav-article em { display: block; font-style: normal; font-size: .75rem; color: var(--texte-doux); }
.nav-article strong { font-weight: 600; font-size: .9rem; }
.nav-article i { color: var(--bleu); }

/* Encart de fin */

.encart-aide {
    margin-top: 3rem;
    background-color: var(--carte);
    border: solid 1px var(--bordure);
    border-radius: var(--rayon);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.encart-aide h2 { margin: 0 0 .25rem; font-size: 1.05rem; font-weight: 600; }
.encart-aide p { margin: 0; color: var(--texte-doux); font-size: .9rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .6rem 1.1rem;
    border-radius: var(--rayon-s);
    font-weight: 600;
    font-size: .875rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color var(--transition);
}

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

/* ------------------------------------------------------------- Responsive */

.menu-bascule, .menu-bouton { display: none; }

@media screen and (max-width: 900px) {
    .page { grid-template-columns: minmax(0, 1fr); }

    .menu-bouton {
        display: flex;
        align-items: center;
        gap: .6rem;
        position: sticky;
        top: 0;
        z-index: 20;
        background-color: var(--lateral);
        color: var(--lateral-texte);
        padding: .9rem 1.25rem;
        font-weight: 600;
        cursor: pointer;
    }

    .lateral {
        display: none;
        position: static;
        height: auto;
    }

    .menu-bascule:checked ~ .lateral { display: flex; }

    .contenu { padding: 2rem 1.25rem; }

    .navigation-articles { flex-direction: column; }
    .nav-article { max-width: 100%; }
    .nav-article.suivant { margin-left: 0; }
}
