/* Base : remise à zéro, texte, boutons, champs. Sert aussi à la page de connexion. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--fond);
    color: var(--texte);
    font-family: var(--police);
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
a { color: var(--bleu); text-decoration: none; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: #cfe9ce; }
:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }

/* Boutons : rectangles aux angles de 8 px. Une seule couleur vive, pour l'action principale. */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 38px; padding: 0 16px;
    border: 1px solid var(--filet-fort); border-radius: var(--rayon);
    background: var(--carte); color: var(--texte);
    font-weight: 600; font-size: 14px; white-space: nowrap;
    transition: background var(--duree), border-color var(--duree), color var(--duree);
}
.btn:hover { background: var(--survol); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primaire { background: var(--vert); border-color: var(--vert); color: #fff; }
.btn-primaire:hover { background: var(--vert-fonce); border-color: var(--vert-fonce); }
.btn-bleu { background: var(--bleu); border-color: var(--bleu); color: #fff; }
.btn-bleu:hover { background: var(--bleu-fonce); border-color: var(--bleu-fonce); }
.btn-danger { color: var(--rouge); border-color: transparent; background: transparent; }
.btn-danger:hover { background: var(--rouge-doux); }
.btn-discret { border-color: transparent; background: transparent; }
.btn-petit { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-large { height: 46px; width: 100%; font-size: 15px; }

.icon-btn {
    display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none;
    border: 0; border-radius: var(--rayon); background: transparent; color: var(--texte-2);
    transition: background var(--duree), color var(--duree);
}
.icon-btn:hover, .icon-btn.is-actif { background: var(--survol); color: var(--texte); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:disabled { opacity: .35; cursor: default; background: transparent; }

/* Champs */
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ > label, .champ > .libelle { font-size: 12.5px; font-weight: 600; color: var(--texte-2); }
.input, .select, .textarea {
    width: 100%; height: 40px; padding: 0 12px;
    border: 1px solid var(--filet-fort); border-radius: var(--rayon);
    background: var(--carte); color: var(--texte);
    transition: border-color var(--duree), box-shadow var(--duree);
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6876' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px var(--bleu-doux); }
.input::placeholder, .textarea::placeholder { color: var(--texte-3); }
.input:disabled, .select:disabled { background: var(--fond); color: var(--texte-2); }
.case { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.case input { width: 17px; height: 17px; accent-color: var(--vert); margin: 0; }
.mdp { position: relative; }
.mdp .input { padding-right: 44px; }
.mdp .icon-btn { position: absolute; right: 2px; top: 2px; }

/* Interrupteur */
.inter { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.inter input { position: absolute; opacity: 0; width: 0; height: 0; }
.inter i { width: 40px; height: 22px; border-radius: 22px; background: var(--filet-fort); position: relative; flex: none; transition: background var(--duree); }
.inter i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform var(--duree); }
.inter input:checked + i { background: var(--vert); }
.inter input:checked + i::after { transform: translateX(18px); }
.inter input:focus-visible + i { outline: 2px solid var(--bleu); outline-offset: 2px; }

/* Connexion : le formulaire seul, au centre */
.page-connexion { background: var(--carte); }
.connexion { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 24px; }
.connexion-form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 18px; }
.connexion-logo { margin: 0 auto 10px; }
.connexion-erreur { padding: 10px 12px; border-radius: var(--rayon); background: var(--rouge-doux); color: var(--rouge); font-weight: 600; font-size: 13.5px; }
