/* ===================================================================
   Résultats préinscriptions UDH — public
   Palette : bleu #005793 · orange #e06f24 · rose #df8a8e · vert #27ae60
   Responsive mobile-first
   =================================================================== */
*{box-sizing:border-box;}
body{font-family:'Nunito',system-ui,sans-serif;margin:0;background:#f4f6f9;color:#1f2a37;}
main{min-height:60vh;}

/* ========== PAGE RECHERCHE ========== */
.rech-wrap{
    display:flex;align-items:center;justify-content:center;
    padding:2.5rem 1rem;min-height:60vh;
    background:linear-gradient(135deg,#eef4fb,#f9eef0);
}
.rech-card{
    width:100%;max-width:520px;background:#fff;border-radius:20px;
    box-shadow:0 20px 60px rgba(0,60,120,.12);
    padding:2.5rem 2rem;text-align:center;
}
.rech-icon{
    width:80px;height:80px;margin:0 auto 1.2rem;border-radius:50%;
    background:linear-gradient(135deg,#005793,#2e86de);
    display:flex;align-items:center;justify-content:center;
    font-size:2.2rem;color:#fff;box-shadow:0 8px 24px rgba(0,87,147,.35);
}
.rech-titre{font-size:1.7rem;font-weight:800;color:#005793;margin:0 0 .6rem;}
.rech-sous{color:#5a6472;font-size:.98rem;line-height:1.6;margin-bottom:1.8rem;}
.rech-form{display:flex;flex-direction:column;gap:.9rem;}
.rech-field{
    display:flex;align-items:center;gap:.6rem;
    border:2px solid #e0e6ef;border-radius:12px;padding:.2rem .9rem;
    transition:border-color .2s,box-shadow .2s;background:#fafbfd;
}
.rech-field:focus-within{border-color:#005793;box-shadow:0 0 0 4px rgba(0,87,147,.12);background:#fff;}
.rech-field i{color:#9aa5b5;font-size:1.05rem;}
.rech-field input{
    flex:1;border:0;outline:0;background:transparent;
    font-size:1.1rem;padding:.8rem 0;font-family:inherit;letter-spacing:.5px;
}
.rech-btn{
    display:flex;align-items:center;justify-content:center;gap:.5rem;
    background:linear-gradient(135deg,#005793,#0a6cbf);color:#fff;border:0;
    padding:.95rem;border-radius:12px;font-size:1.05rem;font-weight:700;
    cursor:pointer;font-family:inherit;transition:transform .15s,box-shadow .2s;
    box-shadow:0 6px 20px rgba(0,87,147,.3);
}
.rech-btn:hover{transform:translateY(-2px);box-shadow:0 10px 28px rgba(0,87,147,.4);}
.rech-err{color:#c0392b;font-size:.88rem;text-align:left;}
.rech-alert{
    display:flex;align-items:flex-start;gap:.6rem;text-align:left;
    padding:.9rem 1rem;border-radius:12px;margin-bottom:1.4rem;font-size:.92rem;
}
.rech-alert--warn{background:#fff4e5;border:1px solid #ffd9a0;color:#9a5b00;}
.rech-alert i{margin-top:.15rem;}
.rech-aide{
    margin-top:1.6rem;padding-top:1.3rem;border-top:1px solid #eef1f5;
    color:#8a94a3;font-size:.85rem;line-height:1.5;text-align:left;
}
.rech-aide i{color:#005793;}

/* ========== PAGE RÉSULTAT ========== */
.res-wrap{
    position:relative;padding:2.5rem 1rem;min-height:70vh;
    display:flex;align-items:flex-start;justify-content:center;
    background:linear-gradient(135deg,#eaf4ec,#eef4fb);
}
#confetti-canvas{position:fixed;inset:0;pointer-events:none;z-index:1;}
.res-card{
    position:relative;z-index:2;width:100%;max-width:600px;background:#fff;
    border-radius:22px;box-shadow:0 24px 70px rgba(0,60,120,.15);
    padding:2.6rem 2rem 2rem;text-align:center;overflow:hidden;
}
.res-card::before{
    content:'';position:absolute;top:0;left:0;right:0;height:8px;
    background:linear-gradient(90deg,#005793,#27ae60,#e06f24,#df8a8e);
}
.res-badge{
    width:92px;height:92px;margin:0 auto 1rem;border-radius:50%;
    background:linear-gradient(135deg,#27ae60,#1e8f4e);
    display:flex;align-items:center;justify-content:center;
    font-size:2.8rem;color:#fff;box-shadow:0 10px 30px rgba(39,174,96,.4);
    animation:pop .6s ease;
}
@keyframes pop{0%{transform:scale(0);}70%{transform:scale(1.15);}100%{transform:scale(1);}}
.res-felicitations{font-size:1.25rem;font-weight:700;color:#27ae60;margin:.3rem 0;}
.res-nom{font-size:1.9rem;font-weight:800;color:#005793;margin:.2rem 0 .6rem;text-transform:uppercase;line-height:1.2;}
.res-annonce{color:#5a6472;font-size:1.02rem;line-height:1.6;margin-bottom:1.6rem;}
.res-annonce strong{color:#27ae60;}

.res-details{
    background:#f7f9fc;border:1px solid #e8edf3;border-radius:14px;
    padding:1.2rem;margin-bottom:1.4rem;text-align:left;
}
.res-ligne{
    display:flex;justify-content:space-between;align-items:center;gap:1rem;
    padding:.7rem 0;border-bottom:1px dashed #e0e6ef;
}
.res-ligne:last-child{border-bottom:0;}
.res-label{color:#6b7684;font-weight:600;font-size:.9rem;display:flex;align-items:center;gap:.5rem;}
.res-label i{color:#005793;width:18px;text-align:center;}
.res-valeur{font-weight:700;color:#1f2a37;text-align:right;}
.res-ligne--frais .res-valeur{color:#e06f24;font-size:1.1rem;}

.res-etapes{
    background:linear-gradient(135deg,#005793,#0a6cbf);color:#fff;
    border-radius:14px;padding:1.4rem;margin-bottom:1.5rem;
}
.res-etapes-titre{font-weight:800;font-size:1.05rem;margin:0 0 .5rem;}
.res-etapes p{margin:0 0 1rem;opacity:.95;font-size:.95rem;line-height:1.5;}
.res-cta{
    display:inline-flex;align-items:center;gap:.5rem;background:#e06f24;color:#fff;
    padding:.8rem 1.6rem;border-radius:10px;font-weight:700;text-decoration:none;
    transition:transform .15s,background .2s;
}
.res-cta:hover{background:#fff;color:#005793;transform:translateY(-2px);}

/* Partage social */
.res-partage{margin-bottom:1.3rem;}
.res-partage-titre{color:#6b7684;font-weight:700;font-size:.92rem;margin-bottom:.8rem;}
.res-partage-btns{display:flex;flex-wrap:wrap;gap:.6rem;justify-content:center;}
.sp{
    display:inline-flex;align-items:center;gap:.4rem;padding:.6rem 1rem;
    border-radius:10px;font-weight:700;font-size:.9rem;border:0;cursor:pointer;
    color:#fff;text-decoration:none;font-family:inherit;transition:transform .15s,opacity .2s;
}
.sp:hover{transform:translateY(-2px);opacity:.92;}
.sp-wa{background:#25d366;}
.sp-fb{background:#1877f2;}
.sp-tw{background:#111;}
.sp-copy{background:#6b7684;}

.res-retour{
    display:inline-block;margin-top:.5rem;color:#005793;font-weight:600;
    text-decoration:none;font-size:.92rem;
}
.res-retour:hover{text-decoration:underline;}

/* ========== RESPONSIVE MOBILE ========== */
@media(max-width:600px){
    .rech-card,.res-card{padding:1.8rem 1.3rem;border-radius:16px;}
    .rech-titre{font-size:1.4rem;}
    .res-nom{font-size:1.5rem;}
    .res-felicitations{font-size:1.1rem;}
    .rech-field input{font-size:1rem;}
    .res-ligne{flex-direction:column;align-items:flex-start;gap:.2rem;}
    .res-valeur{text-align:left;}
    .res-partage-btns{flex-direction:column;}
    .sp{width:100%;justify-content:center;}
    .rech-icon{width:66px;height:66px;font-size:1.8rem;}
    .res-badge{width:78px;height:78px;font-size:2.3rem;}
}

/* ========== BACK OFFICE (léger, réutilise admin.css si présent) ========== */
.adm-wrap{max-width:1100px;margin:2rem auto;padding:0 1rem;font-family:'Nunito',system-ui,sans-serif;}

/* ===== Alerte "en traitement" (bleu info) ===== */
.rech-alert--info{background:#e8f1fb;border:1px solid #b8d4f0;color:#1a4d7a;}
.rech-alert--info strong{display:block;margin-bottom:.3rem;}
.rech-alert--info p{margin:0;font-size:.88rem;line-height:1.5;color:#33608a;}

/* ===== Bouton "générer ma carte" ===== */
.sp-img{background:#e06f24;}
.sp-dl{background:#27ae60;}
.sp-close{background:#6b7684;}

/* ===== CARTE CERTIFICAT (source de l'image) ===== */
.cert{position:fixed;left:0;top:0;width:800px;background:#fff;display:none;z-index:-1;opacity:0;pointer-events:none;}
.cert-bordure{
    margin:0;padding:48px 44px;
    border:3px double #005793;position:relative;
    background:
      radial-gradient(circle at 12% 12%, rgba(224,111,36,.06), transparent 40%),
      radial-gradient(circle at 88% 88%, rgba(0,87,147,.06), transparent 40%),
      #fff;
    font-family:'Nunito',sans-serif;text-align:center;
}
.cert-head{display:flex;align-items:center;justify-content:center;gap:18px;margin-bottom:8px;}
.cert-logo{height:90px;width:auto;}
.cert-univ{text-align:left;}
.cert-univ strong{display:block;color:#005793;font-size:19px;letter-spacing:.5px;line-height:1.2;}
.cert-univ span{color:#df8a8e;font-size:13px;font-style:italic;letter-spacing:2px;}
.cert-ruban{
    display:inline-block;margin:14px auto 22px;padding:7px 26px;
    background:#005793;color:#fff;font-weight:700;letter-spacing:2px;font-size:13px;border-radius:4px;
}
.cert-intro{color:#666;font-size:15px;margin:0 0 6px;}
.cert-nom{color:#005793;font-size:34px;font-weight:800;margin:6px 0;text-transform:uppercase;letter-spacing:1px;}
.cert-texte{color:#666;font-size:15px;margin:6px 0 18px;}
.cert-affect{margin:14px 40px;padding:18px 24px;background:#f5f9fd;border-left:5px solid #e06f24;border-radius:6px;display:block;}
.cert-fac{color:#005793;font-size:20px;font-weight:700;}
.cert-fil{color:#444;font-size:16px;margin-top:6px;}
.cert-foot{margin-top:24px;}
.cert-sceau{
    width:64px;height:64px;margin:0 auto 8px;border-radius:50%;
    background:linear-gradient(135deg,#e06f24,#f4a259);
    display:flex;align-items:center;justify-content:center;color:#fff;font-size:30px;
    box-shadow:0 4px 14px rgba(224,111,36,.4);
}
.cert-felic{color:#27ae60;font-weight:700;font-size:17px;margin:0;}
.cert-marque{position:absolute;bottom:14px;right:22px;color:#b0b8c4;font-size:12px;letter-spacing:1px;}

/* ===== Modal aperçu ===== */
.apercu-modal{
    display:none;position:fixed;inset:0;z-index:9999;
    background:rgba(11,31,51,.85);align-items:center;justify-content:center;padding:1rem;
}
.apercu-box{
    background:#fff;border-radius:16px;padding:1.6rem;max-width:520px;width:100%;
    text-align:center;max-height:92vh;overflow:auto;
}
.apercu-titre{font-weight:800;color:#005793;font-size:1.2rem;margin:0 0 1rem;}
#apercu-img{width:100%;height:auto;border-radius:8px;border:1px solid #e5e9f0;margin-bottom:1rem;}
.apercu-actions{display:flex;gap:.6rem;justify-content:center;flex-wrap:wrap;}
.apercu-aide{color:#8a94a3;font-size:.85rem;margin:.9rem 0 0;}

@media(max-width:600px){
    .apercu-box{padding:1.1rem;}
}

/* Aide sous le bouton générer */
.res-partage-aide{color:#8a94a3;font-size:.82rem;margin:.7rem 0 0;line-height:1.4;}
.sp-img{background:#e06f24;font-size:.95rem;}

/* ===== PAGE LISTE D'ATTENTE (sobre) ===== */
.att-wrap{padding:2.5rem 1rem;min-height:60vh;display:flex;align-items:flex-start;justify-content:center;background:linear-gradient(135deg,#fdf6e9,#eef2f7);}
.att-wrap{background:linear-gradient(135deg,#fdf6e9,#eef2f7);}
.att-card{width:100%;max-width:560px;background:#fff;border-radius:18px;box-shadow:0 20px 60px rgba(0,60,120,.12);padding:2.4rem 1.8rem;text-align:center;border-top:6px solid #e0a020;}
.att-badge{width:84px;height:84px;margin:0 auto 1rem;border-radius:50%;background:linear-gradient(135deg,#e0a020,#f0b840);display:flex;align-items:center;justify-content:center;font-size:2.4rem;color:#fff;box-shadow:0 8px 24px rgba(224,160,32,.4);}
.att-nom{font-size:1.7rem;font-weight:800;color:#005793;margin:.4rem 0 .5rem;text-transform:uppercase;}
.att-annonce{color:#5a6472;font-size:1.05rem;margin-bottom:1.5rem;}
.att-annonce strong{color:#c67f00;}
.att-details{background:#f7f9fc;border:1px solid #e8edf3;border-radius:14px;padding:1.1rem;margin-bottom:1.3rem;text-align:left;}
.att-ligne{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.65rem 0;border-bottom:1px dashed #e0e6ef;}
.att-ligne:last-child{border-bottom:0;}
.att-label{color:#6b7684;font-weight:600;font-size:.9rem;display:flex;align-items:center;gap:.5rem;}
.att-label i{color:#005793;width:18px;text-align:center;}
.att-valeur{font-weight:700;color:#1f2a37;text-align:right;}
.att-info{background:#fff8ec;border:1px solid #f5d99a;border-radius:12px;padding:1rem 1.1rem;text-align:left;color:#8a5a00;font-size:.9rem;line-height:1.55;margin-bottom:1.3rem;}
.att-info i{color:#e0a020;}
.att-retour{display:inline-block;color:#005793;font-weight:600;text-decoration:none;font-size:.92rem;}
.att-retour:hover{text-decoration:underline;}
@media(max-width:600px){.att-card{padding:1.7rem 1.2rem;}.att-nom{font-size:1.4rem;}.att-ligne{flex-direction:column;align-items:flex-start;gap:.2rem;}.att-valeur{text-align:left;}}
