/* Variables globales */
:root {
    --primary-color: #4a90e2;
    --primary-color-light: #4a90e2A6;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --background-color: #f5f6fa;
    --text-color: #2c3e50;
    --border-radius: 8px;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    padding: 20px;
}

/* Container principal */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* En-tête */
h1 {
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2em;
}

/* Introduction */
.form-intro {
    text-align: center;
    margin: 20px 0 30px;
    padding: 20px;
    background: var(--background-color);
    border-radius: var(--border-radius);
}

.form-intro p {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

/* Bouton En savoir plus */
.learn-more-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    outline: none;
    transition: background-color 0.3s ease;
    border: none;
}

.learn-more-btn:hover {
    background-color: #357abd;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 20px auto;
    padding: 40px;
    width: 90%;
    max-width: 800px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.modal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.modal-content h2 {
    color: var(--secondary-color);
    margin-bottom: 30px;
    font-size: 2em;
    text-align: center;
}

.modal-content h3 {
    color: var(--primary-color);
    margin: 20px 0 15px;
    font-size: 1.4em;
}

.modal-content p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--text-color);
}

.modal-content ul {
    margin: 20px 0;
    padding-left: 20px;
}

.modal-content li {
    margin-bottom: 12px;
    line-height: 1.6;
    position: relative;
    padding-left: 5px;
}

.modal-content strong {
    color: var(--secondary-color);
}

.close-modal {
    position: absolute;
    right: -20px;
    top: -20px;
    font-size: 34px;
    cursor: pointer;
    color: var(--secondary-color);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: #f5f6fa;
    transition: all 0.3s ease;
    line-height: 30px;
}

.close-modal:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Tooltips améliorés */
.help-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 6px;
    margin-right: 5px;
    cursor: help;
}

.help-tooltip::before {
    content: "?";
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background-color: var(--primary-color-light);
    color: white;
    border-radius: 50%;
    font-size: 12px;
}

.tooltip-content {
    visibility: hidden;
    position: absolute;
    bottom: 125%;
    left: 0%;
    transform: translateX(-10px);
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    width: 220px;
    white-space: normal;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    transform: translateX(14px);
    border-width: 6px;
    border-style: solid;
    border-color: var(--secondary-color) transparent transparent transparent;
}

.help-tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Checkboxes stylisées */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
    margin: 15px 35px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Style personnalisé pour les checkboxes */
.checkbox-container label {
    position: relative;
    cursor: pointer;
    font-size: 15px;
    user-select: none;
    display: inline-block;
    color: var(--text-color);
    margin-bottom: 0;
    width: 100%;
    padding: 2px 5px 0px 5px;
}

.checkbox-container label:before {
    content: '';
    position: absolute;
    left: -34px;
    top: 55%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-color: #fff;
    border: 2px solid var(--primary-color-light);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-container input[type="checkbox"]:checked + label:before {
    background-color: var(--primary-color);
}

.checkbox-container label:after {
    content: '';
    position: absolute;
    left: -24px;
    top: 49%;
    transform: translateY(-50%) rotate(45deg);
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.checkbox-container input[type="checkbox"]:checked + label:after {
    opacity: 1;
}

.checkbox-container:hover label:before {
    border-color: var(--primary-color);
    background-color: rgba(74, 144, 226, 0.1);
}

/* Responsive design pour les checkboxes */
@media (max-width: 768px) {
    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

/* Groupes de formulaire */
.form-group {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--background-color);
    border-radius: var(--border-radius);
}

.form-group h2 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* Labels et inputs */
label {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-weight: 500;
}

input[type="text"],
input[type="password"],
#countrySelectButton,
input[list="countries"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Bouton de soumission */
.submit-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #357abd;
}

.submit-btn i {
    margin-right: 8px;
}

/* Messages d'erreur */
.error {
    background-color: #fee;
    color: var(--accent-color);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--accent-color);
}

/* Bannières d'images */
.banntop, .bannbot {
    margin: 20px 0;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.banntop img, .bannbot img {
    width: 100%;
    height: auto;
    display: block;
}

.coupon-banner{
    padding: 1rem;
    background: greenyellow;
    border-radius: 1rem;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.2rem;
    color: #333;
}

/* Responsive design */
@media (max-width: 768px) {
    .form-container {
        padding: 15px;
    }

    .modal-content {
        width: 95%;
        margin: 10px auto;
        padding: 20px;
    }

    h1 {
        font-size: 1.8em;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    animation: fadeIn 0.3s ease-in-out;
}

footer div {
    text-align: center;
    margin-top: 60px;
    font-size: 11px;
    color: grey;
    padding-bottom:2rem;
}

footer div p {
    padding: 0.5rem;
}

footer a,footer a:visited,footer a:link,footer a:hover,footer a:active {
    color: grey;
}

a#popupactive:link,a#popupactive:visited,a#popupactive:hover,a#popupactive:active {
    font-size: 0.8rem;
    margin: auto;
    color:#555;
    text-align: center;
    display: block;
}

#lapopup{
    display:none;
    top: 0;
    left: 0;
    background-color: white;
    padding: 3rem;
    margin: 5% 20%;
    position: absolute;
    font-size: 0.8rem;
    z-index: 5;
    line-height: 1.3rem;
}

#cachepopup{
    display:none;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: #000A;
    z-index: 3;
    height: 100%;
}

.dateshaserror {
    padding: 1rem;
    border: 1px red solid;
    background-color: #f25643;
    color: floralwhite;
    border-radius: 20px;
    margin: 1.5rem 0;
}

.dateshaserror h3{
    color: floralwhite;
}

.custom-select-container {
    position: relative;
    width: 100%;
}

.select-button {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.select-button:after {
    content: '▼';
    font-size: 12px;
}

.select-button.open:after {
    content: '▲';
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-box {
    width: calc(100% - 20px);
    padding: 8px;
    border: none;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
}

.option {
    padding: 8px 12px;
    cursor: pointer;
}

.option:hover {
    background-color: #f0f0f0;
}

.selected {
    background-color: #e6e6e6;
}

/* Style pour l'état required */
.select-button#countrySelectButton.required {
    border-color: var(--accent-color);
}

.error-message {
    color: var(--accent-color);
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.error-message.visible {
    display: block;
}