/* GP2I - Composants (Formulaire, RGPD, Alerts) */

/* FORMULAIRE DE CONTACT avec effet Liquid Glass */
form {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    /* Effet verre transparent */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-radius: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Reflet lumineux en haut du formulaire */
form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 100%
    );
    pointer-events: none;
    border-radius: 24px 24px 0 0;
}

form div {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

/* Labels des champs */
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-dark);
    font-size: 0.95rem;
}

/* Inputs et textarea avec effet glass */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    /* Fond glass pour les inputs */
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: var(--color-text);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Focus sur les champs */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 0 0 4px rgba(212, 163, 115, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
}

/* Textarea specifique */
textarea {
    min-height: 150px;
    resize: none;
}

/* Checkbox pour le consentement */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-right: 0.75rem;
    vertical-align: middle;
    accent-color: var(--color-primary);
}

/* Label du checkbox (consentement) */
label:has(input[type="checkbox"]) {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-weight: 400;
    font-size: 0.9rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Bouton submit avec effet glass premium */
button[type="submit"] {
    width: 100%;
    padding: 1.2rem 2rem;
    background: rgba(212, 163, 115, 0.9);
    backdrop-filter: blur(10px);
    color: var(--color-dark);
    font-size: 1.1rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Reflet animé sur le bouton */
button[type="submit"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 70%
    );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s ease;
}

button[type="submit"]:hover::before {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

button[type="submit"]:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
    box-shadow: 
        0 12px 30px rgba(212, 163, 115, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.8);
}

button[type="submit"]:active {
    transform: translateY(-1px);
}

button[type="submit"]:disabled {
    background: rgba(200, 200, 200, 0.5);
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

/* BANDEAU COOKIES RGPD - Version centree et compacte */
.gdpr-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    z-index: 10000;
    max-width: 1100px;
    width: 90%;
    padding: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Bandeau visible */
.gdpr-banner.visible {
    transform: translateX(-50%) translateY(0);
}

/* Contenu du bandeau - SPECIFIQUE à .gdpr-content seulement */
.gdpr-banner .gdpr-content {
    padding: 1.8rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    /* Fond marron fonce pour contraster avec la page */
    background: var(--color-dark);
    border-radius: 16px;
    border: 1px solid rgba(212, 163, 115, 0.3);
}

/* Texte du bandeau - couleurs adaptees au fond fonce */
.gdpr-text {
    flex: 1;
    min-width: 300px;
}

.gdpr-text h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--color-accent);
    font-weight: 700;
}

.gdpr-text p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 0;
}

.gdpr-text a {
    color: var(--color-accent);
    text-decoration: underline;
    font-weight: 600;
}

.gdpr-text a:hover {
    color: white;
}

/* Boutons du bandeau */
.gdpr-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-accept,
.btn-decline {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

/* Bouton Accepter - adapte au fond fonce */
.btn-accept {
    background: var(--color-accent);
    color: var(--color-dark);
}

.btn-accept:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 163, 115, 0.4);
}

/* Bouton Refuser - adapte au fond fonce */
.btn-decline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-decline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* SPINNER DE CHARGEMENT */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* MESSAGES D'ALERTE */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideDown 0.3s ease-out;
    font-weight: 500;
}

/* Animation d'apparition des alertes */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alerte de succes */
.alert-success {
    background: rgba(107, 142, 35, 0.1);
    border: 2px solid rgba(107, 142, 35, 0.3);
    color: #2d5016;
}

/* Alerte d'erreur */
.alert-error {
    background: rgba(220, 38, 38, 0.1);
    border: 2px solid rgba(220, 38, 38, 0.3);
    color: #991b1b;
}

/* Icone dans les alertes */
.alert-icon {
    font-size: 1.5rem;
    font-weight: 900;
}

/* Erreur sur un champ specifique */
.field-error {
    color: #DC2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* ANIMATIONS D'APPARITION */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.8s ease-out forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* LAZY LOADING IMAGES */
.lazy-load {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.lazy-load.loaded {
    opacity: 1;
}

/* LIENS DANS LE CONTENU */
a {
    color: var(--color-secondary);
    transition: all 0.3s;
}

a:hover {
    color: var(--color-accent);
}

/* LISTES */
ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

ul li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

/* ARTICLE DE LA PAGE POLITIQUE */
article {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    line-height: 1.8;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

article h2 {
    text-align: left;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: var(--color-primary);
}

article h2:first-of-type {
    margin-top: 0;
}

article p,
article ul {
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

article strong {
    color: var(--color-primary);
    font-weight: 700;
}

article em {
    font-style: italic;
    color: var(--color-text);
    opacity: 0.8;
}

/* RESPONSIVE MOBILE */
@media (max-width: 768px) {
    form {
        padding: 2rem 1.5rem;
    }

    .gdpr-banner {
        bottom: 10px;
        width: 95%;
    }

    .gdpr-banner .gdpr-content {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .gdpr-text {
        min-width: auto;
    }

    .gdpr-actions {
        width: 100%;
        justify-content: center;
    }

    .btn-accept,
    .btn-decline {
        flex: 1;
        min-width: 120px;
    }

    article {
        padding: 2rem 1.5rem;
    }
}

/* TRANSITIONS GLOBALES */
* {
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation pour le badge hero */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.95); }
}
