/*
 * Page « Devenir revendeur ».
 *
 * Reprend les cartes de la page Contact (decouverte.css) : la page reste de la
 * même famille. Le formulaire est découpé en trois groupes — vous, votre
 * entreprise, votre projet — plutôt qu'une colonne de onze champs.
 */

/* — Atouts — */
.revendeur__atouts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--espace-2);
    max-width: 1080px;
    margin: 0 auto var(--espace-6);
    padding: 0;
    list-style: none;
}
.atout {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--espace-3) var(--espace-2);
    border-radius: var(--rayon-l);
    background: var(--creme-sombre);
    text-align: center;
}
.atout__icone {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0 auto var(--espace-1);
    border-radius: var(--rayon-rond);
    background: var(--blanc-chaud);
    color: var(--bordeaux);
    font-size: 1.2rem;
}
.atout strong { font-family: var(--police-titre); color: var(--bordeaux-profond); }
.atout span:last-child { font-size: var(--taille-s); color: var(--texte-doux); }

/* — Mise en page : le formulaire à droite, le contexte à gauche — */
.revendeur__grille {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
    gap: var(--espace-4);
    align-items: start;
    max-width: 1080px;
    margin: 0 auto var(--espace-8);
}
.revendeur__cote { display: grid; gap: var(--espace-3); position: sticky; top: var(--espace-3); }

.etapes {
    display: grid;
    gap: var(--espace-2);
    margin: var(--espace-3) 0 0;
    padding: 0;
    list-style: none;
    counter-reset: etape;
}
.etapes li {
    position: relative;
    padding-left: 2.6rem;
    counter-increment: etape;
    color: var(--texte-doux);
}
.etapes li::before {
    content: counter(etape);
    position: absolute;
    left: 0;
    top: -2px;
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: var(--rayon-rond);
    background: var(--rose-pale);
    color: var(--bordeaux);
    font-weight: 700;
    font-size: var(--taille-s);
}
.etapes strong { color: var(--texte); }

/* — Formulaire — */
.revendeur__legende { font-size: var(--taille-s); color: var(--texte-doux); }

.groupe {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--espace-2) var(--espace-3);
    margin: 0 0 var(--espace-4);
    padding: 0;
    border: 0;
}
.groupe legend {
    grid-column: 1 / -1;
    margin-bottom: var(--espace-2);
    padding: 0 0 var(--espace-1);
    width: 100%;
    border-bottom: 1px solid var(--creme-sombre);
    font-family: var(--police-titre);
    font-size: var(--taille-m);
    color: var(--bordeaux-profond);
}

.champ { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.champ--large { grid-column: 1 / -1; }
.champ label { font-size: var(--taille-s); font-weight: 600; color: var(--texte); }
.champ__requis { color: var(--bordeaux-vif); }
.champ__facultatif { font-weight: 400; color: var(--texte-doux); }
.champ input,
.champ textarea {
    width: 100%;
    padding: 0.7rem var(--espace-2);
    border: 2px solid var(--creme-sombre);
    border-radius: var(--rayon-m);
    background: var(--blanc-chaud);
    color: var(--texte);
    font: inherit;
    transition: border-color var(--transition);
}
.champ textarea { resize: vertical; min-height: 9rem; }
.champ input:hover,
.champ textarea:hover { border-color: var(--rose); }
.champ input:focus-visible,
.champ textarea:focus-visible {
    outline: 3px solid var(--rose-vif);
    outline-offset: 1px;
    border-color: var(--bordeaux-vif);
}
.champ [aria-invalid="true"] { border-color: var(--bordeaux-vif); background: var(--rose-tres-pale); }
.champ__aide { font-size: var(--taille-xs); color: var(--texte-doux); }
.champ__erreur { font-size: var(--taille-xs); font-weight: 600; color: var(--bordeaux-vif); }
.champ__erreur:empty { display: none; }

.revendeur__captcha { margin-bottom: var(--espace-2); min-height: 78px; }
.revendeur__captcha:empty { min-height: 0; }
.revendeur__donnees { font-size: var(--taille-xs); color: var(--texte-doux); }
.revendeur__donnees a { color: var(--bordeaux); }
.revendeur__envoyer { width: 100%; justify-content: center; }
.revendeur__envoyer:disabled { opacity: 0.6; cursor: wait; }

.revendeur__etat { min-height: 1.4em; margin-top: var(--espace-2); font-weight: 600; text-align: center; }
.revendeur__etat:empty { display: none; }
.revendeur__etat--succes {
    padding: var(--espace-2);
    border-radius: var(--rayon-m);
    background: #e7efe8;
    color: #2f4a35;
}
.revendeur__etat--erreur { color: var(--bordeaux-vif); }
.revendeur__secours { font-size: var(--taille-s); color: var(--texte-doux); text-align: center; }
.revendeur__secours a { color: var(--bordeaux); font-weight: 600; }

@media (max-width: 900px) {
    .revendeur__atouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .revendeur__grille { grid-template-columns: minmax(0, 1fr); }
    .revendeur__cote { position: static; order: 2; }
}
@media (max-width: 560px) {
    .groupe { grid-template-columns: minmax(0, 1fr); }
    .revendeur__atouts { grid-template-columns: minmax(0, 1fr); }
}
