/* =========================================================
   ESETEC — page Événements
   Carte : affiche, nom de l'événement, bouton « Prendre mon billet »
========================================================= */
*{ box-sizing: border-box; }
html, body{ margin: 0; }
body{
    min-height: 100vh;
    background: #f4f4f6;
    color: #1c1c1e;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}
svg{ fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* En-tête (téléphone uniquement) */
.evt-entete{ display: none; }
.evt-logo{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 17px;
    font-weight: 800;
}
.evt-logo img{ width: 34px; height: 30px; padding: 1px; background: #fff; border-radius: 7px; object-fit: contain; }
.evt-logo em{ color: #ff6a13; font-style: normal; }

/* Titre de la page */
.evt-page{ max-width: 1400px; margin: 0 auto; padding: 28px 28px 50px; }
.evt-titre h1{ margin: 0 0 16px; font-size: 30px; font-weight: 800; letter-spacing: -0.01em; }
.evt-titre p{ margin: 0 0 24px; max-width: 640px; color: #666; font-size: 15px; line-height: 1.55; }

/* Grille de cartes */
.evt-grille{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.evt-carte{
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ececf0;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.evt-carte-image{
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    padding: 0;
    overflow: hidden;
    background: #1a1a1a;
    border: 0;
    cursor: pointer;
}
.evt-carte-image img{ width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.evt-carte-image:hover img{ transform: scale(1.03); }
.evt-date-pastille{
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
    padding: 6px 8px 5px;
    background: #fff;
    border-radius: 10px;
    color: #ff5e00;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
    text-transform: lowercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.evt-date-pastille b{ color: #1c1c1e; font-size: 20px; }
.evt-carte-corps{ display: flex; flex-direction: column; flex: 1; padding: 12px 14px 14px; }
.evt-nom{ margin: 0 0 4px; font-size: 16.5px; font-weight: 800; line-height: 1.3; }
.evt-lieu{ margin: 0 0 6px; color: #777; font-size: 13px; line-height: 1.4; }
.evt-prix{ margin: 0 0 12px; color: #ff5e00; font-size: 15px; font-weight: 800; }
.evt-btn-billet{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-top: auto;
    padding: 10px 14px;
    background: #ff5e00;
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease;
}
.evt-btn-billet:hover{ background: #e65400; }

/* Chargement et liste vide */
.evt-sq{
    aspect-ratio: 4 / 6;
    border-radius: 12px;
    background: linear-gradient(90deg, #eee8e2 0%, #f7f3ef 50%, #eee8e2 100%);
    background-size: 200% 100%;
    animation: evt-reflet 1.2s ease-in-out infinite;
}
@keyframes evt-reflet{ from{ background-position: 200% 0; } to{ background-position: -200% 0; } }
.evt-vide{
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 50px 20px;
    text-align: center;
    background: #fff;
    border: 1px dashed #d6d0c9;
    border-radius: 14px;
    color: #666;
    line-height: 1.6;
}
.evt-vide svg{ width: 52px; height: 52px; color: #c9bdb2; }
.evt-vide p{ margin: 0; }
.evt-vide b{ color: #1c1c1e; }
.evt-vide .evt-btn-billet{ width: auto; margin: 0; }

/* Fiche de l'événement */
.evt-fond{
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10,8,6,0.7);
}
.evt-fond[hidden]{ display: none; }
.fiche-ouverte{ overflow: hidden; }
.evt-fiche{
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    width: 100%;
    max-width: 880px;
    max-height: 90vh;
    overflow: hidden;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.35);
}
.evt-fiche-affiche{ grid-row: 1 / span 2; background: #111; display: flex; align-items: center; justify-content: center; }
.evt-fiche-affiche img{ width: 100%; height: 100%; max-height: 90vh; object-fit: contain; display: block; }
.evt-fiche-corps{ overflow-y: auto; padding: 24px 24px 10px; }
.evt-fiche-corps h2{ margin: 0 40px 12px 0; font-size: 22px; line-height: 1.25; }
.evt-fiche-corps h3{ margin: 18px 0 10px; font-size: 15px; }
.evt-infos{ display: flex; flex-direction: column; gap: 8px; color: #444; font-size: 14.5px; }
.evt-infos div{ display: flex; align-items: flex-start; gap: 10px; }
.evt-infos div:has(span:empty){ display: none; }
.evt-infos svg{ flex: none; width: 19px; height: 19px; color: #ff5e00; margin-top: 1px; }
.evt-desc{ margin: 14px 0 0; color: #555; font-size: 14.5px; line-height: 1.6; white-space: pre-line; }
.evt-desc:empty{ display: none; }
.evt-tarifs{ display: flex; flex-direction: column; gap: 8px; }
.evt-tarif{
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    padding: 10px 14px;
    border: 1.5px solid #e6e1dc;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.evt-tarif:has(input:checked){ border-color: #ff5e00; background: #fff6ef; }
.evt-tarif input{ accent-color: #ff5e00; width: 18px; height: 18px; margin: 0; }
.evt-tarif-nom{ flex: 1; font-weight: 700; font-size: 15px; }
.evt-tarif-prix{ font-weight: 800; color: #1c1c1e; }
.evt-quantite{ display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 6px; font-size: 14.5px; font-weight: 600; }
.evt-stepper{ display: flex; align-items: center; border: 1.5px solid #e6e1dc; border-radius: 10px; overflow: hidden; }
.evt-stepper button{ width: 44px; height: 44px; border: 0; background: #faf8f6; font-size: 20px; cursor: pointer; color: #1c1c1e; }
.evt-stepper button:disabled{ color: #c8c2bc; cursor: default; }
.evt-stepper output{ min-width: 40px; text-align: center; font-weight: 800; font-size: 16px; }
.evt-fiche-pied{
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px 18px;
    border-top: 1px solid #f0ece8;
    background: #fff;
}
.evt-total{ display: flex; flex-direction: column; }
.evt-total small{ color: #777; font-size: 12px; }
.evt-total b{ font-size: 19px; white-space: nowrap; }
.evt-btn-billet.grand{ flex: 1; margin: 0; min-height: 50px; font-size: 16px; }
.evt-fermer{
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    color: #1c1c1e;
    font-size: 17px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Barre du bas : élément actif */
.bas-nav a.actif{ color: #ff5e00; }

/* ===================== TÉLÉPHONE ===================== */
@media (max-width: 900px){
    body{ background: #f6f2ee; }
    .evt-entete{
        display: flex;
        align-items: center;
        padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
        background: #000;
        border-bottom: 3px solid #ff5e00;
    }
    .evt-page{ padding: 18px 14px 30px; }
    .evt-titre h1{ font-size: 24px; margin-bottom: 12px; }
    .evt-titre p{ margin-bottom: 18px; font-size: 14px; }
    .evt-grille{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .evt-carte{ border-radius: 14px; }
    .evt-carte-corps{ padding: 10px 10px 10px; }
    .evt-nom{ font-size: 14.5px; }
    .evt-lieu{ font-size: 12px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
    .evt-prix{ font-size: 14px; margin-bottom: 10px; }
    .evt-btn-billet{ font-size: 13.5px; padding: 8px 6px; min-height: 40px; }
    .evt-date-pastille{ min-width: 44px; font-size: 11px; }
    .evt-date-pastille b{ font-size: 17px; }

    /* Fiche en plein écran, bouton fixé en bas */
    .evt-fond{ padding: 0; align-items: stretch; }
    .evt-fiche{
        display: flex;
        flex-direction: column;
        max-width: none;
        max-height: none;
        height: 100%;
        border-radius: 0;
    }
    .evt-fiche-affiche{ flex: none; max-height: 48vh; }
    .evt-fiche-affiche img{ max-height: 48vh; }
    .evt-fiche-corps{ flex: 1; padding: 18px 18px 10px; }
    .evt-fiche-corps h2{ margin-right: 0; font-size: 20px; }
    .evt-fiche-pied{ padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px rgba(0,0,0,0.06); }
    .evt-fermer{ top: calc(10px + env(safe-area-inset-top)); }
}
@media (max-width: 360px){
    .evt-grille{ grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce){
    .evt-sq{ animation: none; }
    .evt-carte-image img{ transition: none; }
}


/* Recherche */
.evt-recherche{
    position: relative;
    max-width: 560px;
    margin: 0 0 22px;
}
.evt-recherche svg{
    position: absolute;
    left: 15px;
    top: 50%;
    width: 19px;
    height: 19px;
    transform: translateY(-50%);
    color: #8a8a90;
    stroke-width: 2.2;
    pointer-events: none;
}
.evt-recherche input{
    width: 100%;
    height: 46px;
    padding: 0 16px 0 44px;
    background: #fff;
    border: 1px solid #dcdce0;
    border-radius: 999px;
    color: #1c1c1e;
    font-family: inherit;
    font-size: 16px;
}
.evt-recherche input:focus{ outline: none; border-color: #ff5e00; box-shadow: 0 0 0 3px rgba(255,94,0,0.18); }

/* Billets restants */
.evt-reste{ margin: -6px 0 12px; color: #15803d; font-size: 13px; font-weight: 700; }
.evt-reste.bientot{ color: #c62828; }
.evt-btn-billet.complet,
.evt-btn-billet:disabled{ background: #b9b4af; cursor: default; }
.evt-tarif-nom small{ display: block; margin-top: 2px; color: #15803d; font-size: 12.5px; font-weight: 600; }
.evt-tarif.plein{ opacity: .55; cursor: default; }
.evt-tarif.plein .evt-tarif-nom small{ color: #c62828; }
@media (max-width: 900px){
    .evt-recherche{ margin-bottom: 16px; }
    .evt-reste{ font-size: 12px; margin-bottom: 8px; }
}


/* =========================================================
   PUBLIER UN ÉVÉNEMENT (sans abonnement, 1 000 FCFA)
========================================================= */
.evt-titre{ display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.evt-titre h1{ margin: 0 !important; }
.evt-btn-proposer{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    background: #1c1c1e;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
}
.evt-btn-proposer svg{ width: 18px; height: 18px; stroke-width: 2.4; color: #ff5e00; }
.evt-btn-proposer:hover{ background: #000; }

.evt-form-fiche{ display: block; max-width: 600px; }
.pub-corps{ max-height: 90vh; overflow-y: auto; padding: 24px 24px 22px; }
.pub-corps h2{ margin: 0 44px 14px 0; font-size: 22px; }
.pub-corps h3{ margin: 18px 0 10px; font-size: 15px; }
.pub-corps h3.centre, .pub-aide.centre{ text-align: center; }
.pub-etapes{ display: flex; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: etape; }
.pub-etapes[hidden]{ display: none; }
.pub-etapes li{
    flex: 1;
    padding: 8px 6px 0;
    border-top: 4px solid #e6e1dc;
    color: #999;
    font-size: 12.5px;
    font-weight: 700;
    text-align: center;
}
.pub-etapes li.actif{ border-color: #ff5e00; color: #1c1c1e; }
.pub-etapes li.fait{ border-color: #16a34a; color: #15803d; }
.pub-etape[hidden]{ display: none; }
.pub-aide{ margin: 0 0 14px; color: #555; font-size: 14px; line-height: 1.55; }
.pub-aide a{ color: #ff5e00; font-weight: 700; }
.pub-affiche{
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 110px;
    margin-bottom: 14px;
    padding: 14px;
    border: 2px dashed #d6d0c9;
    border-radius: 12px;
    background: #faf8f6;
    text-align: center;
    cursor: pointer;
}
.pub-affiche:hover{ border-color: #ff5e00; }
.pub-affiche input{ display: none; }
.pub-affiche img{ max-width: 100%; max-height: 240px; border-radius: 8px; }
.pub-affiche img[hidden]{ display: none; }
.pub-affiche span{ display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; }
.pub-affiche small{ color: #777; font-size: 13px; }
.pub-champs{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pub-champs label{ display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: #1c1c1e; min-width: 0; }
.pub-champs label.large{ grid-column: 1 / -1; }
.pub-champs input, .pub-champs textarea, .pub-tarif input{
    width: 100%;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #d6d0c9;
    border-radius: 10px;
    background: #fff;
    color: #1c1c1e;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
}
.pub-champs input:focus, .pub-champs textarea:focus, .pub-tarif input:focus{ outline: none; border-color: #ff5e00; box-shadow: 0 0 0 3px rgba(255,94,0,0.15); }
.pub-champs textarea{ resize: vertical; }
.pub-tarifs{ display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pub-tarif{ display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr) minmax(0,1fr) 44px; gap: 8px; }
.pub-tarif button{ border: 0; border-radius: 10px; background: #f4f1ed; color: #c62828; font-size: 15px; cursor: pointer; }
.pub-ajouter-tarif{ padding: 10px 16px; border: 1px dashed #c9bfb6; border-radius: 10px; background: #fff; font: 600 14px inherit; font-family: inherit; cursor: pointer; margin-bottom: 16px; }
.pub-erreur{ margin: 0 0 12px; padding: 11px 13px; border-radius: 10px; background: #fde8e8; color: #c62828; font-size: 14px; font-weight: 600; }
.pub-erreur[hidden]{ display: none; }
.pub-montant{ display: flex; flex-direction: column; align-items: center; margin: 6px 0 16px; padding: 18px; border-radius: 14px; background: #fff6ef; }
.pub-montant small{ color: #777; font-size: 13px; }
.pub-montant b{ color: #ff5e00; font-size: 30px; }
.pub-lien{ display: inline; margin: 12px auto 0; padding: 6px; background: none; border: 0; color: #555; font-family: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.pub-etape > .pub-lien{ display: block; }
.evt-btn-billet.vert{ background: #16a34a; }
.evt-btn-billet.vert:hover{ background: #15803d; }
.pub-ok{ display: flex; justify-content: center; margin: 10px 0 4px; color: #16a34a; }
.pub-ok svg{ width: 64px; height: 64px; stroke-width: 1.6; }

@media (max-width: 900px){
    .evt-titre{ margin-bottom: 12px; }
    .evt-btn-proposer{ min-height: 40px; padding: 0 14px; font-size: 13.5px; }
    .evt-form-fiche{ max-width: none; }
    .pub-corps{ max-height: none; height: 100%; padding: calc(16px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
    .pub-corps h2{ font-size: 20px; }
}
@media (max-width: 480px){
    .pub-champs{ grid-template-columns: 1fr 1fr; }
    .pub-tarif{ grid-template-columns: minmax(0,1fr) minmax(0,1fr) 44px; padding-bottom: 8px; border-bottom: 1px solid #f0ebe6; }
    .pub-tarif .t-nom{ grid-column: 1 / -1; }
}


/* Bouton flottant « Publier mon événement » (remplace le bouton sous le titre) */
.evt-btn-proposer{
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 900;
    min-height: 56px;
    padding: 0 22px 0 18px;
    background: #ff5e00;
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(255,94,0,0.38);
    font-size: 15px;
    transition: transform .15s ease, background .2s ease;
}
.evt-btn-proposer svg{ width: 22px; height: 22px; color: #fff; stroke-width: 2.6; }
.evt-btn-proposer:hover{ background: #e65400; }
.evt-btn-proposer:active{ transform: scale(.94); }
.evt-btn-proposer:focus-visible{ outline: 3px solid rgba(255,94,0,.45); outline-offset: 3px; }
.evt-page{ padding-bottom: 110px; }
@media (max-width: 900px){
    .evt-btn-proposer{
        right: 16px;
        bottom: calc(76px + env(safe-area-inset-bottom));
        width: 58px;
        height: 58px;
        min-height: 0;
        padding: 0;
        justify-content: center;
    }
    .evt-btn-proposer span{ display: none; }
    .evt-btn-proposer svg{ width: 26px; height: 26px; }
    .evt-page{ padding-bottom: 100px; }
}
