/* Global styles */
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Container principal */
.container {
    display: flex;
    flex-wrap: wrap;
    height: 100vh;
}

/* Section gauche */
.options {
    width: 66.6%;
    padding: 20px;
    background-color: #ffffff;
    color: #333;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Titres */
h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

/* Champs de formulaire */
.options form label {
    margin: 15px 0 5px;
    font-weight: bold;
}

.options form input,
.options form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.options form input[type="range"] {
    width: 100%;
}

/* Boutons */
.buttons {
    display: flex;
    justify-content: space-between;
}

.buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #ffa500;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buttons button:hover {
    background-color: #ff7300;
}

/* Section droite */
.preview {
    width: 33.3%;
    padding: 20px;
    background-color: #263375;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-container {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    align-items: center;
}

.card {
    width: 300px;
    height: 190px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Texte uniquement sur la carte arrière */
#backCard .text {
    position: absolute;
    bottom: 5px;
    left: 5px;
    z-index: 1;
    text-align: left;
}

/* Nom + Prénom */
.text-nom {
    font-size: 18px;
    color: #000;
    white-space: nowrap;
}

/* Poste */
.text-poste {
    font-size: 14px;
    color: #000;
    margin-top: 4px;
    white-space: nowrap;        /* ❌ interdit les retours à la ligne */
    max-width: 260px;           /* ✅ limite l'espace pour rester dans la carte */
    overflow: hidden;           /* ❌ masque ce qui dépasse */
    text-overflow: ellipsis;    /* ➕ affiche "..." si trop long */
}


/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
    }

    .options,
    .preview {
        width: 100%;
        padding: 15px;
    }

    .card {
        width: 250px;
        height: 160px;
    }

    .buttons button {
        flex: 1;
        margin: 5px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 20px;
    }

    .card {
        width: 220px;
        height: 140px;
    }

    .text-nom {
        font-size: 9px !important;
    }

    .text-poste {
        font-size: 8px !important;
    }

    #backCard .text {
        bottom: 1px !important;
        left: 1px !important;
    }
}

}
