/* =====================================================================
   Prix du Management – feuille de style COMPLÉMENTAIRE du formulaire
   À charger APRÈS styleCSS.css (feuille d'origine du site, conservée telle quelle) :
   - styleCSS.css fournit : fond, conteneur #container_sup / #container / #contenu_int, polices, couleurs de marque
   - ce fichier ajoute : champs, boutons, messages, co-auteurs, envoi du PDF, avec la même charte
   ===================================================================== */
:root { --accent:#ED6B6A; --bleu-fonce:#18275C; --vert:#00A5AE; --rouge:#bb2020; --gris:#777; --bord:#ddd; }

/* ---------- Adaptations de la mise en page d'origine ---------- */
#contenu_int { width:auto; max-width:100%; box-sizing:border-box; }   /* 790 px fixes -> s'adapte aux petits écrans */
#contenu_int h1 { display:block; line-height:1.2; margin:0 0 .5rem; color:var(--bleu-fonce); }
#contenu_int h2 { color:var(--bleu-fonce); }
/* le texte justifié de la feuille d'origine reste pour les paragraphes ; formulaires et messages sont alignés à gauche */
form, .err, .msg-err, .ok, .warn, .success, .hint, .box, fieldset { text-align:left; }

.steps { color:var(--gris); }
.hint  { color:var(--gris); font-size:.85rem; }
.titre-section { margin-top:2rem; font-size:1.15rem; }

/* ---------- Jauge de progression « Étape n sur 3 » (rose de la charte) ---------- */
.jauge { margin:.5rem 0 1.5rem; text-align:left; }
.jauge-texte { display:flex; justify-content:space-between; align-items:baseline; gap:1rem; margin-bottom:.4rem; color:var(--bleu-fonce); font-size:.95rem; }
.jauge-etape { font-weight:bold; text-transform:uppercase; letter-spacing:.02em; }
.jauge-etape b { font-size:1.25em; color:var(--accent); }
.jauge-titre { color:var(--gris); text-align:right; }

.jauge-piste { position:relative; height:14px; border-radius:999px; background:#f7dedd; overflow:hidden; }
.jauge-remplissage { height:100%; border-radius:999px; background:linear-gradient(90deg, #f28d8c, var(--accent)); animation:jauge-remplir .8s ease-out; }
.jauge-1 .jauge-remplissage { width:33.333%; }
.jauge-2 .jauge-remplissage { width:66.667%; }
.jauge-3 .jauge-remplissage { width:100%; }
/* repères blancs entre les trois étapes */
.jauge-piste::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,
  transparent calc(33.333% - 1.5px), #fff calc(33.333% - 1.5px), #fff calc(33.333% + 1.5px), transparent calc(33.333% + 1.5px),
  transparent calc(66.667% - 1.5px), #fff calc(66.667% - 1.5px), #fff calc(66.667% + 1.5px), transparent calc(66.667% + 1.5px)); }
@keyframes jauge-remplir { from { width:0; } }
@media (prefers-reduced-motion: reduce) { .jauge-remplissage { animation:none; } }

/* ---------- Champs de formulaire ---------- */
label { display:block; margin-top:1rem; font-weight:600; }
input[type=text], input[type=email], input[type=date], input[type=password], select, textarea {
  width:100%; padding:.6rem; margin-top:.25rem; border:1px solid #bbb; border-radius:6px;
  box-sizing:border-box; font-size:1rem; font-family:inherit;
}
input:focus, select:focus, textarea:focus { outline:2px solid var(--accent); outline-offset:0; border-color:var(--accent); }
textarea { min-height:160px; resize:vertical; }
.invalid { border-color:var(--rouge) !important; }
.err     { color:var(--rouge); font-size:.85rem; min-height:1em; }   /* erreur sous un champ */
.msg-err { color:var(--rouge); margin-top:1rem; }                    /* message d'erreur en bloc */
#global  { margin-top:1rem; color:var(--rouge); }
.count   { text-align:right; font-size:.85rem; color:var(--gris); }
.count.court { color:var(--rouge); }

fieldset { border:1px solid var(--bord); border-radius:8px; margin-top:1.25rem; padding:.5rem 1rem 1rem; }
legend   { font-weight:600; padding:0 .4rem; color:var(--bleu-fonce); }

.radio { display:flex; gap:.6rem; align-items:flex-start; margin-top:.6rem; font-weight:400; cursor:pointer; }
.radio input { margin-top:.25rem; }

input[type=checkbox] { margin:.3rem .7rem 0 0; flex:none; }
.check { display:flex; align-items:flex-start; font-weight:400; font-size:.95rem; line-height:1.4; }
.rgpd  { margin-top:1.5rem; padding:.8rem 1rem; background:#f6f8fc; border:1px solid #dde4f3; border-radius:8px; }

/* ---------- Formulaires sur deux colonnes (étiquette | champ) sur ordinateur ----------
   Même principe que .formulaireEtape1_label de styleCSS.css (étiquette à gauche, ~22-24 %), en grille CSS.
   Sous 700 px de large (mobile), la grille n'est pas appliquée : étiquettes au-dessus des champs, une seule colonne. */
@media (min-width: 700px) {
  .form-2col { display:grid; grid-template-columns:minmax(140px, 24%) 1fr; column-gap:1.5rem; align-items:start; }

  .form-2col > label { grid-column:1; margin-top:1rem; padding-top:calc(.6rem + 1px); }   /* aligne le texte sur celui du champ */
  .form-2col > input[type=text], .form-2col > input[type=email], .form-2col > input[type=date],
  .form-2col > select, .form-2col > textarea { grid-column:2; margin-top:1rem; }
  .form-2col > .err, .form-2col > .hint, .form-2col > .count { grid-column:2; }

  /* blocs pleine largeur */
  .form-2col > h2, .form-2col > fieldset, .form-2col > .rgpd, .form-2col > #global { grid-column:1 / -1; }
  .form-2col > fieldset { min-width:0; }

  .form-2col > button[type=submit] { grid-column:2; justify-self:start; }
}

/* ---------- Coordonnées (étape 1) : plusieurs champs par ligne sur ordinateur ----------
   Mobile (< 700 px) : un champ par ligne. Ordinateur : .ligne = 2 colonnes égales ;
   .ligne-pleine = 1 champ sur toute la largeur ; .ligne-cp = ville (2/3) + code postal (1/3) ;
   .ligne-identite = civilité + nom + prénom. */
.champ { min-width:0; }
@media (min-width: 700px) {
  .ligne { display:grid; grid-template-columns:1fr 1fr; gap:0 1.5rem; }
  .ligne-pleine { grid-template-columns:1fr; }
  .ligne-cp { grid-template-columns:2fr 1fr; }
  .ligne-identite { grid-template-columns:minmax(110px, 1fr) 2fr 2fr; }   /* civilité (étroite) + nom + prénom */
}

/* ---------- Co-auteurs (étape 2) ---------- */
.co      { border:1px solid var(--bord); border-radius:8px; padding:.5rem 1rem 1rem; margin-top:1rem; background:#fafafa; }
.co-head { display:flex; justify-content:space-between; align-items:center; margin-top:.5rem; }
.co label { font-weight:500; margin-top:.6rem; }
.grid    { display:grid; grid-template-columns:1fr 1fr; gap:0 1rem; }
@media (max-width:520px) { .grid { grid-template-columns:1fr; } }

/* ---------- Boutons (même logique que #bouton : plein rose, inversé au survol) ---------- */
button {
  padding:.7rem 1.5rem; border:2px solid var(--accent); border-radius:10px; background:var(--accent); color:#fff;
  font-size:1rem; font-weight:bold; font-family:inherit; cursor:pointer; transition:all 250ms ease-in-out;
}
button:hover:not(:disabled) { background:#fff; color:var(--accent); }
form button[type=submit] { margin-top:1.5rem; }
button:disabled { opacity:.6; cursor:default; }
button.secondary { background:#fff; color:var(--accent); margin-top:1rem; }
button.secondary:hover:not(:disabled) { background:var(--accent); color:#fff; }
button.link { background:none; border:0; color:var(--rouge); padding:0; font-size:.9rem; font-weight:normal; }
button.link:hover:not(:disabled) { background:none; color:var(--rouge); text-decoration:underline; }

.actions { margin-top:20px; display:flex; gap:10px; flex-wrap:wrap; }
.actions form button[type=submit] { margin-top:0; }
.btn-valider { background:var(--vert); border-color:var(--vert); }
.btn-valider:hover:not(:disabled) { background:#fff; color:var(--vert); }
.btn-recommencer { background:var(--rouge); border-color:var(--rouge); }
.btn-recommencer:hover:not(:disabled) { background:#fff; color:var(--rouge); }

/* ---------- Envoi du PDF (étapes 3 et 4) ---------- */
.drop { border:2px dashed #bbb; border-radius:10px; padding:1.5rem; text-align:center; margin-top:1rem; }
.drop label { display:inline; margin:0; }
/* styleCSS.css masque tous les input[type=file] (height/width:0) : on garde ici le champ natif visible */
.drop input[type=file] { height:auto; width:auto; overflow:visible; }
progress { width:100%; margin-top:1rem; display:none; accent-color:var(--accent); }
.box { border:1px solid var(--bord); border-radius:8px; padding:20px; background:#f9f9f9; }
.pdf-link { display:inline-block; margin:12px 0; padding:10px 16px; background:var(--bleu-fonce); color:#fff; text-decoration:none; border-radius:10px; }
.pdf-link:hover { background:var(--accent); }

/* ---------- Messages ---------- */
.ok      { background:#eef8f0; border:1px solid #b9dfc1; border-radius:8px; padding:.7rem 1rem; margin-top:1rem; }
.success { background:#eef8f0; border:1px solid #b9dfc1; border-radius:8px; padding:1rem 1.25rem; }
.warn    { background:#fff6e5; border:1px solid #f0d49b; border-radius:8px; padding:.8rem 1.1rem; margin-top:1rem; }
.ref     { font-size:1.1rem; }

@media print { .noprint { display:none; } }