/* Kiducademy, feuille de style principale */

:root {
    --encre: #1B2A41;
    --encre-doux: #5A6B80;
    --encre-tres-doux: #8A97A8;

    --bleu: #4A90E2;
    --bleu-fonce: #2C5688;
    --bleu-pale: #EBF4FD;

    --orange: #FF8C42;
    --orange-fonce: #C25B15;
    --orange-pale: #FFF4ED;

    --vert: #4C7F14;
    --vert-vif: #7ED321;
    --vert-pale: #F0FCE8;

    --papier: #FFFFFF;
    --surface: #F5F7FA;
    --craie: #E2E8F0;

    --display: 'Poppins', 'Trebuchet MS', sans-serif;
    --texte: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    --ludique: 'Fredoka', 'Poppins', sans-serif;

    --rayon: 14px;
    --rayon-petit: 8px;
    --largeur: 1120px;
    --gouttiere: clamp(1.25rem, 4vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
    margin: 0;
    background: var(--papier);
    color: var(--encre);
    font-family: var(--texte);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 0.6em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

p { margin: 0 0 1.1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--bleu-fonce); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange-fonce); }

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

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

.enveloppe {
    width: 100%;
    max-width: var(--largeur);
    margin-inline: auto;
    padding-inline: var(--gouttiere);
}

.saut-contenu {
    position: absolute;
    left: -9999px;
    background: var(--encre);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: var(--rayon-petit);
    z-index: 100;
}
.saut-contenu:focus { left: 1rem; top: 1rem; }

/* En-tete */

.entete {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--craie);
}

.entete__grille {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 68px;
    flex-wrap: wrap;
}

.marque {
    font-family: var(--ludique);
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--encre);
    text-decoration: none;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.marque:hover { color: var(--encre); }

.marque__point {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--orange);
    flex: none;
}

.navigation {
    display: flex;
    gap: 1.4rem;
    margin-left: auto;
    align-items: center;
    flex-wrap: wrap;
}

.navigation a {
    color: var(--encre-doux);
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 500;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
}
.navigation a:hover { color: var(--encre); border-bottom-color: var(--craie); }
.navigation a[aria-current="page"] { color: var(--encre); border-bottom-color: var(--orange); }

/* Boutons */

.bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--display);
    font-weight: 600;
    font-size: 0.98rem;
    padding: 0.8rem 1.5rem;
    border-radius: var(--rayon-petit);
    border: 2px solid transparent;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.bouton:active { transform: translateY(1px); }

.bouton--plein { background: var(--orange); color: #fff; }
.bouton--plein:hover { background: var(--orange-fonce); color: #fff; }

.bouton--contour { background: transparent; color: var(--encre); border-color: var(--craie); }
.bouton--contour:hover { border-color: var(--encre); color: var(--encre); }

.actions { display: flex; gap: 0.85rem; flex-wrap: wrap; }

/* Sections */

.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--surface { background: var(--surface); }
.section--encre { background: var(--encre); color: #fff; }
.section--encre h2 { color: #fff; }
.section--encre p { color: #C7D2E0; }
.section--encre .surtitre { color: #7E8FA6; }
.section--encre .liste-nette li { color: #C7D2E0; }
.section--encre .liste-nette strong { color: #fff; }
.section--encre a { color: #fff; }
.section--encre a:hover { color: var(--orange); }

.surtitre {
    font-family: var(--texte);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--encre-tres-doux);
    margin: 0 0 0.9rem;
    display: block;
}

.intro { font-size: 1.08rem; color: var(--encre-doux); max-width: 62ch; }

.tete-section { margin-bottom: clamp(2rem, 4vw, 3rem); }

/* Heros */

.heros { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem); }

.heros__etiquette {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: var(--orange-pale);
    color: var(--orange-fonce);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1.6rem;
}

.heros__pastille {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--orange);
    flex: none;
}

.heros p.intro { font-size: 1.15rem; margin-bottom: 2rem; }

/* Carnet de bord */

.carnet {
    background: var(--papier);
    border: 1px solid var(--craie);
    border-radius: var(--rayon);
    overflow: hidden;
}

.carnet__entete {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--craie);
    background: var(--surface);
}

.carnet__titre {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.02rem;
    margin: 0;
}

.carnet__date {
    font-size: 0.85rem;
    color: var(--encre-doux);
    font-variant-numeric: tabular-nums;
}

.chantier {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.35rem 1rem;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--craie);
}
.chantier:last-child { border-bottom: 0; }

.chantier__nom {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.chantier__detail {
    grid-column: 1 / -1;
    font-size: 0.92rem;
    color: var(--encre-doux);
    margin: 0;
    max-width: 60ch;
}

.chantier__jauge {
    grid-column: 1 / -1;
    height: 6px;
    background: #EDF1F6;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.7rem;
}

.chantier__niveau {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--bleu);
    width: var(--niveau, 0%);
}

.js-anime .chantier__niveau {
    width: 0;
    transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--retard, 0ms);
}
.js-anime.est-visible .chantier__niveau { width: var(--niveau, 0%); }

.etat {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    white-space: nowrap;
    align-self: start;
}
.etat::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}
.etat--fait { background: var(--vert-pale); color: var(--vert); }
.etat--cours { background: var(--bleu-pale); color: var(--bleu-fonce); }
.etat--planifie { background: var(--surface); color: var(--encre-doux); }

.chantier--fait .chantier__niveau { background: var(--vert-vif); }
.chantier--planifie .chantier__niveau { background: var(--craie); }

/* Grilles de cartes */

.grille {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.carte {
    background: var(--papier);
    border: 1px solid var(--craie);
    border-radius: var(--rayon);
    padding: 1.6rem;
}
.carte h3 { margin-bottom: 0.5rem; }
.carte p { font-size: 0.96rem; color: var(--encre-doux); }

.carte__role {
    display: block;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bleu-fonce);
    margin-bottom: 0.7rem;
}
.carte--orange .carte__role { color: var(--orange-fonce); }
.carte--vert .carte__role { color: var(--vert); }

.carte__symbole {
    font-family: var(--ludique);
    font-size: 1.5rem;
    font-weight: 600;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
    background: var(--bleu-pale);
    color: var(--bleu-fonce);
}
.carte--orange .carte__role {
    display: block;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bleu-fonce);
    margin-bottom: 0.7rem;
}
.carte--orange .carte__role { color: var(--orange-fonce); }
.carte--vert .carte__role { color: var(--vert); }

.carte__symbole { background: var(--orange-pale); color: var(--orange-fonce); }
.carte--vert .carte__role {
    display: block;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bleu-fonce);
    margin-bottom: 0.7rem;
}
.carte--orange .carte__role { color: var(--orange-fonce); }
.carte--vert .carte__role { color: var(--vert); }

.carte__symbole { background: var(--vert-pale); color: var(--vert); }

/* Listes */

.liste-nette { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }

.liste-nette li {
    position: relative;
    padding-left: 1.9rem;
    color: var(--encre-doux);
    font-size: 0.98rem;
}

.liste-nette li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.58em;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--vert-vif);
}

.liste-nette--sans li::before { background: var(--craie); }
.liste-nette--reste li::before { background: var(--orange); }

.liste-nette strong { color: var(--encre); font-weight: 600; }

/* Feuille de route */

.route { list-style: none; margin: 0; padding: 0; }

.route li {
    display: grid;
    grid-template-columns: 8.5rem 1fr;
    gap: 0.4rem 1.5rem;
    padding: 1.3rem 0;
    border-top: 1px solid var(--craie);
    align-items: start;
}
.route li:last-child { border-bottom: 1px solid var(--craie); }

.route__quand {
    font-family: var(--texte);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--encre-tres-doux);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding-top: 0.15rem;
}

.route__quoi { margin: 0; }
.route__quoi strong { display: block; font-family: var(--display); font-size: 1.02rem; margin-bottom: 0.2rem; }
.route__quoi span { font-size: 0.95rem; color: var(--encre-doux); }

@media (max-width: 620px) {
    .route li { grid-template-columns: 1fr; }
}

/* Formulaire */

.formulaire { display: grid; gap: 1.1rem; max-width: 520px; }

.champ { display: grid; gap: 0.35rem; }

.champ label { font-weight: 600; font-size: 0.92rem; }

.champ input, .champ select, .champ textarea {
    font-family: var(--texte);
    font-size: 1rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--craie);
    border-radius: var(--rayon-petit);
    background: var(--papier);
    color: var(--encre);
    width: 100%;
}
.champ input:focus, .champ select:focus, .champ textarea:focus { border-color: var(--bleu); }

.champ__aide { font-size: 0.85rem; color: var(--encre-doux); }

.champ--case { grid-template-columns: auto 1fr; align-items: start; gap: 0.7rem; }
.champ--case input { width: auto; margin-top: 0.3rem; }
.champ--case label { font-weight: 400; font-size: 0.92rem; color: var(--encre-doux); }

/* Encadres */

.encadre {
    border-left: 3px solid var(--orange);
    background: var(--orange-pale);
    padding: 1.25rem 1.5rem;
    border-radius: 0 var(--rayon-petit) var(--rayon-petit) 0;
}
.encadre p { font-size: 0.97rem; }
.encadre--bleu { border-left-color: var(--bleu); background: var(--bleu-pale); }

/* Pied de page */

.pied {
    background: var(--encre);
    color: #A9B6C7;
    padding-block: 3rem 2rem;
    font-size: 0.92rem;
}
.pied a { color: #fff; text-decoration: none; }
.pied a:hover { color: var(--orange); text-decoration: underline; }

.pied__grille {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.pied h4 { color: #fff; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; }

.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }

.pied__bas {
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.86rem;
}

.pied .marque { color: #fff; }
.pied .marque:hover { color: #fff; }

/* Utilitaires */

.mesure { max-width: 68ch; }
.deux-colonnes { display: grid; gap: clamp(2rem, 5vw, 3.5rem); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.pile { display: grid; gap: 1.5rem; }
.centre-texte { text-align: center; }
.centre-texte p { margin-inline: auto; }
.centre-texte .actions { justify-content: center; }
