/* =============================================================================
   mon_equipe2.css
   Feuille de style principale de la page équipe.
   Polices Google Fonts pour la section 1 (Playfair Display + DM Sans).
   ============================================================================= */



/* =============================================================================
   BASE
   ============================================================================= */

body {
    background: #F2F2F2;
    width: 100%;
    margin: 0;
}

h2 {
    color: #e95f11;
    text-align: center;
    margin-bottom: 4px;
}

.brut {
    width: 100%;
    text-align: center;
    margin: 0;
    height: auto;
}

a {
    color: black;
}


/* =============================================================================
   BANNER
   ============================================================================= */

#banner {
    background-size: 1600px;
    height: 266px;
    width: 100%;
    overflow: hidden;
    background-repeat: no-repeat;
    background-position: center top;
}


/* =============================================================================
   SECTION 1 — Hero Card modernisée (photo | texte)
   ============================================================================= */

/* Box-sizing local — évite les surprises de largeur/hauteur */
#section1 * {
    box-sizing: border-box;
}

/* Conteneur principal — layout en deux colonnes : photo | texte */
#section1 {
    display: grid;
    grid-template-columns: 420px 1fr; /* colonne photo fixe, texte prend le reste */
    align-items: stretch;             /* les deux colonnes ont la même hauteur */
    width: 68%;
    max-width: 1100px;
    background: #ffffff;
    margin: 40px auto 0;
    border-radius: 28px;
    overflow: hidden;                 /* découpe la photo aux coins arrondis */
    box-shadow:
            0 2px 0 rgba(233, 99, 23, 0.18),   /* liseré orange subtil */
            0 24px 80px rgba(0, 0, 0, 0.09);   /* ombre portée douce */
    padding: 0;
    animation: heroIn 0.7s cubic-bezier(.22, .68, 0, 1.2) both;
}

/* Animation d'entrée de la carte entière */
@keyframes heroIn {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Colonne gauche — photo pleine hauteur */
#bloc_photo {
    position: relative; /* nécessaire pour positionner #panoramique en absolu */
    width: 100%;
    height: 100%;
    min-height: 380px;
    overflow: hidden;
    margin: 0;
}

/* Dégradé décoratif superposé à la photo */
#bloc_photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
            160deg,
            rgba(233, 99, 23, 0.18) 0%,
            transparent 55%,
            rgba(0, 0, 0, 0.28) 100%
    );
    z-index: 1;
    pointer-events: none; /* le pseudo-élément ne bloque pas les clics */
    transition: opacity 0.4s ease;
}

/* La photo en cover pour remplir le bloc sans déformation */
#panoramique {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(.22, .68, 0, 1.2);
}

/* Léger zoom de la photo au survol de toute la carte */
#section1:hover #panoramique {
    transform: scale(1.04);
}

/* Colonne droite — texte, stats et barre de progression */
#bloc1 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    width: auto;   /* la grille gère la largeur */
    padding: 48px 52px;
    margin: 0;
    text-align: left;
    animation: textIn 0.8s cubic-bezier(.22, .68, 0, 1.2) 0.15s both;
}

/* Animation d'entrée du texte, légèrement décalée par rapport à la carte */
@keyframes textIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Nom de l'équipe — titre principal en serif percutant */
#name_team {
    font-weight: 900;
    color: #1a1a1a;
    text-transform: none;  /* annule le small-caps de l'ancien CSS */
    font-variant: normal;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 10px;
}

/* Petit trait orange sous le titre, qui s'allonge au survol */
#name_team::after {
    content: '';
    display: block;
    width: 44px;
    height: 3px;
    background: #e96317;
    border-radius: 100px;
    margin-top: 12px;
    transition: width 0.4s cubic-bezier(.22, .68, 0, 1.2);
}

#section1:hover #name_team::after {
    width: 80px;
}

/* Sous-titre "Organisé par…" */
#orga_team {
    font-weight: 500;
    color: #9a9a9a;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 20px 0;
}

/* Description / pitch */
#pitch {
    line-height: 1.7;
    color: #555;
    margin-bottom: 28px;
    overflow: hidden;
}

#pitch img {
    margin: 5px auto;
}

#pitch iframe {
    width: 100%;
}

/* Bloc stats — séparé du pitch par un fin trait */
#sous_bloc {
    text-align: left;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    padding-top: 24px;
}

/* Chiffres principaux : montant collecté et nombre de collecteurs */
.volume {
    display: inline-block;
    font-weight: 700;
    color: #e96317;
    line-height: 1.1;
    margin-right: 32px;
    margin-bottom: 8px;
}

/* Le second .volume (nb de collecteurs) est légèrement atténué */
.volume + .volume {
    color: #888;
}

/* Objectif de collecte — libellé + montant cible côte à côte */
#bloc_target {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 8px;
}

#target {
    font-weight: 600;
    color: #aaa;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

#amount_cible {
    font-weight: 700;
    color: #1a1a1a;
}

/* Barre de progression — piste grise */
.percentage-wrapper {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.07);
    border-radius: 100px;
    overflow: hidden; /* coupe la barre remplie aux bords arrondis */
    margin: 0;
    box-shadow: none;
}

/* Remplissage animé ; la largeur finale est portée par le style inline PHP */
.percentage {
    position: relative;
    height: 6px;
    min-width: 6%;   /* toujours visible même proche de 0 % */
    max-width: 100%;
    background: linear-gradient(90deg, #e96317, #f5a623);
    border-radius: 100px;
    border: none;
    font-size: 0;    /* cache le texte % éventuellement injecté dans la div */
    margin: 0;
    animation: fillBar 1.2s cubic-bezier(.22, .68, 0, 1.2) 0.5s both;
}

/* Pastille flottante affichant le % via l'attribut data-pct
   Ajouter data-pct="<?php echo $rate; ?> %" sur la div .percentage cote PHP */
.percentage::after {
    content: attr(data-pct);
    position: absolute;
    right: 0;
    top: -28px;
    font-weight: 700;
    color: #e96317;
    background: rgba(233, 99, 23, 0.10);
    border-radius: 100px;
    padding: 2px 7px;
    white-space: nowrap;
}

/* La barre part de zéro et rejoint la largeur définie en inline */
@keyframes fillBar {
    from { width: 0; }
}


/* =============================================================================
   BLOC MONTANT / BOUTONS CTA
   ============================================================================= */

.bloc_montant {
    width: 60%;
    background: #ffffff;
    border-radius: 24px;
    padding: 32px 40px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 24px auto;
}

/* Animation en cascade sur les boutons */
.bloc_montant > * {
    animation: fadeUp 0.4s cubic-bezier(.22, .68, 0, 1.2) both;
}
.bloc_montant > *:nth-child(1) { animation-delay: 0.05s; }
.bloc_montant > *:nth-child(2) { animation-delay: 0.10s; }
.bloc_montant > *:nth-child(3) { animation-delay: 0.15s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.btn-cta,
.btn-secondary,
.btn-admin {
    width: 60%;
    max-width: 320px;
}

/* Bouton principal — créer une cagnotte */
.btn-cta {
    display: block;
    padding: 16px 24px;
    background: #e96317;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(.22, .68, 0, 1.2),
    box-shadow 0.2s ease,
    background 0.2s ease;
}

/* Reflet lumineux interne */
.btn-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    border-radius: 14px;
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(233, 99, 23, 0.35);
    background: #d4551a;
}

.btn-cta:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Bouton secondaire — retour au challenge */
.btn-secondary {
    display: block;
    padding: 14px 24px;
    background: transparent;
    color: #1a1a1a;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(.22, .68, 0, 1.2),
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: #e96317;
    color: #e96317;
    background: rgba(233, 99, 23, 0.04);
}

/* Bouton admin — modifier l'équipe */
.btn-admin {
    display: block;
    padding: 14px 24px;
    background: transparent;
    color: #39b54a;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1.5px solid #39b54a;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(.22, .68, 0, 1.2),
    background 0.2s ease,
    color 0.2s ease;
}

.btn-admin:hover {
    transform: translateY(-2px);
    background: #39b54a;
    color: #fff;
}

/* Règle générale bouton (legacy) */
button {
    font-size: 16px;
    width: 70%;
    margin: 0;
}


/* =============================================================================
   SECTION 2 — Liste des collecteurs
   ============================================================================= */

#section2 {
    margin-top: 20px;
    padding: 30px 40px;
    background: #f4f2ee;
    border-radius: 12px;
    width: 65%;
    margin-left: auto;
    margin-right: auto;
}

/* En-tête avec badge compteur */
.collecteurs-header {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}

.collecteurs-header h2 {
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -0.03em;
    line-height: 1;
    text-align: center;
}

.count-badge {
    font-weight: 700;
    color: #e96317;
    background: rgba(233, 99, 23, 0.12);
    border: 1px solid rgba(233, 99, 23, 0.3);
    border-radius: 100px;
    padding: 4px 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Grille de cartes collecteurs */
.collecteurs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Carte collecteur */
.card {
    position: relative;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    display: block;
    transition: transform 0.35s cubic-bezier(.22, .68, 0, 1.2),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
    cursor: pointer;
    animation: cardIn 0.55s cubic-bezier(.22, .68, 0, 1.2) both;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 24px 60px rgba(233, 99, 23, 0.13), 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: rgba(233, 99, 23, 0.35);
}

/* Reflet orange subtil au survol */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(233, 99, 23, 0.07) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 1;
    border-radius: 20px;
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
}

/* Zone image carrée */
.card-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s cubic-bezier(.22, .68, 0, 1.2);
}

.card:hover .card-image {
    transform: scale(1.08);
}

/* Fondu bas de l'image vers le blanc */
.card-image-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(to top, #ffffff 0%, transparent 100%);
    pointer-events: none;
}

/* Corps de la carte */
.card-body {
    padding: 14px 18px 20px;
    position: relative;
    z-index: 2;
}

.card-name {
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.card-amount {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #e96317;
}

.card-amount .euro-sign {
    opacity: 0.8;
}

/* Mini barre de progression dans chaque carte */
.card-progress {
    margin-top: 12px;
    height: 3px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 100px;
    overflow: hidden;
}

.card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e96317, #f5a623);
    border-radius: 100px;
    transition: width 1s cubic-bezier(.22, .68, 0, 1.2) 0.2s;
}

/* Animations d'entrée en cascade */
@keyframes cardIn {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.13s; }
.card:nth-child(3) { animation-delay: 0.21s; }
.card:nth-child(4) { animation-delay: 0.29s; }
.card:nth-child(5) { animation-delay: 0.37s; }
.card:nth-child(6) { animation-delay: 0.45s; }
.card:nth-child(7) { animation-delay: 0.53s; }


/* =============================================================================
   DIVERS — éléments réutilisés sur la page
   ============================================================================= */

#montant_mobile { display: none; }
#montant_desktop { display: block; }

.barre {
    border-bottom: 1px black dotted;
    padding: 10px 0 20px 0;
}

.orga {
    margin-bottom: 30px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.choix_prix {
    font-weight: bold;
    color: #e9954a;
    margin-bottom: 5px;
}

#courrier {
    margin: 0 0 0 20px;
}

.item {
    line-height: 3.2em;
}

.icone {
    width: 16px;
    margin: 0 8px 0 0;
    vertical-align: middle;
    padding-bottom: 2px;
}

.bloc02 {
    background: white;
    width: 95%;
    height: auto;
    padding: 15px;
    overflow: hidden;
    text-align: left;
    margin: 0 0 10px 0;
}

.bloc02 div {
    padding-bottom: 5px;
    line-height: 1.3em;
}

.bloc02 a {
    line-height: 2.3em;
}

.bloc02 a:hover {
    color: #FF003A;
}

.bloc02 .puce {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
    padding: 0;
}

.bloc02 .puce img {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    margin-bottom: 11px;
    display: inline-block;
    vertical-align: middle;
    padding: 0;
}

#bloc7_desk {
    background: white;
    display: inline-block;
    vertical-align: middle;
    width: 45%;
    height: auto;
    text-align: center;
    margin: 0 5px;
    padding: 15px;
    border-radius: 2%;
}

#line0bis, #line0, #line1, #line2 {
    width: 100%;
    margin: 0 auto 5px;
}

#blocky {
    background: white;
    margin: 0 0 10px 0;
    padding: 5px 0;
}

#nombre, #remaining {
    display: inline-block;
    vertical-align: middle;
    padding: 20px;
}

#goodies { margin: 10px auto; }

#montant {
    font-weight: bold;
    margin-top: 10px;
}

#reliquat {
    font-weight: 800;
    margin-top: 10px;
}

#reste { font-weight: 400; }

#euro {
    font-weight: bold;
    margin-right: 5px;
    display: inline-block;
    vertical-align: middle;
}

#date {
    color: #898989;
    display: inline-block;
    vertical-align: bottom;
}

#date_euro { margin-top: 4px; }

.bloc_contributeur { width: 70%; }

#pseudo {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.titre_bloc {
    font-weight: bold;
    padding-bottom: 2%;
    z-index: 999;
}

#editer { color: #FF5D83; }
#editer:hover { color: #FF3161; }

#titre_orga { margin-bottom: 15px; }

#msg_orga {
    width: 98%;
    padding: 4px;
    margin-bottom: 15px;
}

#nb_guest {
    font-weight: normal;
    margin-top: 30px;
    text-align: right;
}

#sous_col2.fixed {
    position: fixed;
    top: 0;
    width: inherit;
}

#bloc13 {
    text-align: center;
    background: white;
    border-radius: 5px;
    width: 95%;
    height: auto;
    padding: 10px;
    margin-bottom: 10px;
    vertical-align: top;
}

#share { margin-bottom: 5px; }
#div_rzo { margin-top: 30px; }

.rzo {
    display: inline-block;
    vertical-align: middle;
    margin: 0 8px;
}

#copy {
    width: 90%;
    margin: 10px 0 20px 0;
    text-align: center;
}

#more_space,
#more_space2,
#more_space2_mob {
    display: block;
    margin: 20px 0 20px 43%;
    color: green;
}

#ligne,
#ligne_mob {
    margin: 20px 0;
    border-bottom: 1px black dotted;
}

#connect {
    color: dimgrey;
    border-bottom: 1px dotted dimgrey;
    padding: 10px 0;
    margin: 20px 0;
}

#titre-msg { padding: 10px 0; }

.square_plus,
.cadre_msg_plus,
.cadre_msg_plus_mob {
    display: none;
}

.cadre_msg,
.cadre_msg_plus,
.cadre_msg_plus_mob {
    border-top: 1px dotted darkgrey;
    padding: 10px 0;
}

.who_msg {
    margin-bottom: 8px;
    text-align: justify;
}

.bloc_msg {
    padding: 0 15px 10px 15px;
    display: inline-block;
    vertical-align: middle;
    width: 87%;
}

.the_msg {
    text-align: justify;
    line-height: 1.5;
    font-style: italic;
}

.img_msg {
    width: 20px;
    margin: 10px 0 0 10px;
}

#signal {
    margin-top: 20px;
    text-align: right;
    color: dimgrey;
    display: block;
}

#msg {
    font-weight: bold;
    white-space: normal;
}

form {
    width: 80%;
    margin: 0 auto;
}

.bloc3 .square,
.square_plus {
    padding: 9px 0;
    margin: 0;
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid lightgrey;
}

.admin_btn {
    margin-top: 20px;
    background: #39b54a;
}

#btn_join { margin-bottom: 15px; }

.mes_cagnottes { margin-top: 40px; }

.boite {
    width: 200px;
    height: 200px;
    margin: 20px;
    background: white;
    padding-bottom: 30px;
    display: inline-block;
    vertical-align: middle;
}

.boite .image {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    background-size: cover;
    background-position: center;
    border-radius: 5%;
}

.boite .name {
    width: 80%;
    margin: 10px auto 0;
    font-weight: bold;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.boite .amount {
    margin: 10px auto 0;
    font-weight: bold;
    color: #e96317;
}


/* =============================================================================
   RESPONSIVE
   ============================================================================= */

/* ── Très petit mobile (< 480 px) ── */
@media screen and (max-width: 479px) {

    #banner {
        height: 75px;
        background-size: 479px;
    }

    #bloc_photo {
        height: 200px;
    }

    #bloc1 {
        padding: 20px 16px 28px;
    }

    .volume {
        margin-right: 16px;
    }

    /* Pastille % masquée pour éviter les débordements */
    .percentage::after {
        display: none;
    }
}

/* ── Mobile (0 – 768 px) ── */
@media screen and (min-width: 0px) and (max-width: 768px) {

    .brut {
        width: 100%;
        overflow-x: hidden;  /* ← ajouter */
    }

    #banner {
        margin-bottom: 20px;
        height: 125px;
        background-size: 768px;
    }

    /* Section 1 en colonne unique */
    #section1 {
        grid-template-columns: 1fr;
        width: 100%;
        border-radius: 0;  /* ← pleine largeur sur mobile, pas d'arrondi */
        margin: 0;
        box-shadow: none;
        max-width: 100vw;
    }

    #bloc_photo {
        height: 260px;
        min-height: unset;
    }

    #bloc1 {
        margin: 10px 0;
        padding: 15px 5px 15px 20px;
        width: 95%;
        border-radius: 0 0 24px 24px;  /* ← arrondi seulement en bas */
    }

    .bloc_montant {
        margin: 10px auto;  /* ← auto pour centrer */
        padding: 15px;
        width: 95%;
        box-sizing: border-box;
        border-radius: 10px;
    }

    #section2 {
        margin: 0;
        width: 100%;
        padding: 20px 15px;
        border-radius: 0;
        box-sizing: border-box;
    }

    #bloc7_desk {
        width: 92%;
        border-radius: 1px;
        margin: 0;
    }

    .boite {
        margin-right: 0;
        margin-left: 0;
        padding-left: 10px;
        padding-bottom: 30px;
    }

    .image {
        width: 70px;
        height: 70px;
    }

    #pitch img {
        width: 99%;
        height: auto;
    }

    #pitch iframe { width: 100%; }

    #montant_mobile { display: block; }
    #montant_desktop { display: none; }
    #lien { display: none; }

    .bloc_msg { width: 75%; }

    .percentage-wrapper {
        margin: 10px auto 30px auto;
    }

    .collecteurs-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 14px;
    }
}

/* ── Petit format (769 – 979 px) ── */
@media screen and (min-width: 769px) and (max-width: 979px) {

    #banner {
        height: 163px;
        background-size: 979px;
    }

    /* Section 1 en colonne unique */
    #section1 {
        grid-template-columns: 1fr;
        width: 100%;
        border-radius: 0;
        margin: 0;
        box-shadow: none;
    }

    #bloc_photo {
        height: 260px;
        min-height: unset;
    }

    #bloc1 {
        padding: 28px 24px 36px;
    }

    #bloc7_desk { width: 75%; }

    .bloc_contributeur { width: 59%; }
    .bloc_msg { width: 80%; }

    #nombre, #remaining {
        padding: 20px 10px;
    }

    #section2 {
        width: 90%;
        padding: 20px;
    }
}

/* ── Moyen format (980 – 1280 px) ── */
@media screen and (min-width: 980px) and (max-width: 1280px) {

    #banner {
        height: 170px;
        background-size: 1024px;
    }

    #bloc7_desk { width: 65%; }

    .bloc_contributeur { width: 65%; }

    #nombre, #remaining {
        padding: 20px 10px;
    }

    #section2 { width: 85%; }
}

/* ── Grand format (> 1600 px) ── */
@media screen and (min-width: 1601px) {

    #banner {
        height: 320px;
        background-size: 1920px;
    }
}