/* Conteneur principal */
#dsp-container {
    background-color: #ffffff;
    padding: 40px;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-family: "Poppins", sans-serif;
}

/* Titres */
#dsp-container h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

#dsp-container p {
    text-align: center;
    font-size: .9rem;
    color: #555;
    margin-bottom: 24px;
}

/* Cartes et colonnes */
#dsp-container .dsp-grid {
    display: flex;
    gap: 20px;
    flex-flow: column wrap;
}
.dsp-parentrow{
    display: flex;
    gap:0;
    flex-direction: column;
}
.dsp-row{
    display: flex;
    flex-direction: row;
    gap: 10px;
}

/* Cartes internes */
.dsp-card {
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 10px;
    /*box-shadow: 0 2px 8px rgba(0,0,0,0.1);*/
    border: 1px solid #D4791F;
}
.dsp-card h3{
    font-size: 1rem;
}

/* Champs input */

.dsp-parentrow .dsp-row input  {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 12px;
    border: 1px solid #d1d5db;
    border-radius: 30px;
    box-sizing: border-box;
    font-size: 14px;
}
.dsp-card #dsp-city input{
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 12px;
    border: 1px solid #d1d5db;
    border-radius: 30px;
    box-sizing: border-box;
    font-size: 14px;
}
/* Boutons généraux */
.button{
    display: flex;
    justify-content: center;
}
.dsp-btn {
    background-color: #E44B3B;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.2s;
    margin-top: 10px;
    border: 1px solid #E44B3B;
}

.dsp-btn:hover {
    background-color: #ffffff;
    color: #E44B3B;
}

/* KPI box */
.kpi-box {
    padding: 12px 15px;
    font-size: 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kpi-box:last-child {
    border-bottom: none;
}

/* Carte */
#map {
    width: 100%;
    height: 300px;
    border-radius: 8px;
}

/* Graphique */
#dspChart {
    width: 100% !important;
    height: 250px !important;
}

/* Zone ville et boutons adaptatifs */
#dsp-city {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap; /* Les boutons passent à la ligne si nécessaire */
}

#dsp-city input {
    flex: 1 1 auto;
    min-width: 120px;
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    box-sizing: border-box;
}

#dsp-city button {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 4px;
    background-color: #4c7be1;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

#dsp-city button:hover {
    background-color: #3b63c7;
}

/* Mobile : input et boutons prennent toute la largeur */
@media(max-width: 768px){
    #dsp-city {
        flex-direction: column;
    }
    #dsp-city button,
    #dsp-city input {
        width: 100%;
    }
    #dsp-container h2 {
    font-size: 1.2rem;
}
    #dsp-container p {
    font-size: .8rem;
}
    #dsp-container {
    padding: 20px;
}
    .dsp-card h3{
    font-size: .9rem;
}
    .dsp-row{
    flex-direction: column;
        gap: 0
}
    .dsp-btn {
    width: 100%;
}
    .kpi {
    width: 100%!important;
    flex-grow: 1;
}
    .dsp-modal-content h2{
        font-size: 1.3rem;
    }
    .dsp-modal-content {
        
}
}

/* Hero / intro */
.dsp-hero {
    text-align: center;
    margin-bottom: 30px;
}

/* Responsive général */

/* ===== MODAL ===== */
.dsp-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    overflow-y: scroll;
}
.card2{
    display: none;
}
.dsp-modal-content {
    background: #fff;
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 900px;
    border-radius: 12px;
    position: relative;
    animation: dspFade 0.3s ease;
}

.dsp-modal-content h2{
        font-size: 1.3rem;
        margin-bottom: 2rem;
    }

#dsp-email-block-modal input{
     width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 30px;
    box-sizing: border-box;
    font-size: 14px;
}

@keyframes dspFade {
    from { transform: translateY(-20px); opacity:0; }
    to { transform: translateY(0); opacity:1; }
}

.dsp-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
}

.dsp-kpis {
    display: flex;
    flex-flow: row wrap!important;
    gap: 20px;
}

.kpi {
    background: #D4791F17;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    width: 24%;
    flex-grow: 1;
}