/**
 * Quentin Contact Slider - Main Stylesheet
 * Version: 1.4.1
 * 
 * TABLE DES MATIERES :
 * 1. Layout & Wrapper (La structure du slider)
 * 2. Formulaire & Inputs (Le style des champs)
 * 3. Boutons (Actions)
 * 4. Modules Spécifiques :
 *    - Honeypot (Sécurité)
 *    - Checkbox (Copie email)
 *    - Récapitulatif (Accordéon)
 *    - Succès (Slide final)
 * 5. Animations & Utilitaires
 * 6. Responsive
 */


/* ==========================================================================
   1. LAYOUT & WRAPPER
   ========================================================================== */

.qcs-slider-wrapper {
    max-width: 500px;
    width: 100%;
    margin: 40px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden; /* Cache les slides qui dépassent */
    position: relative;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Force le calcul des bordures INCLUS dans la largeur */
.qcs-slider-wrapper * {
    box-sizing: border-box;
}

.qcs-form {
    width: 100%;
    margin: 0;
}

/* La piste glissante (Track) */
.qcs-slider-track {
    display: flex;
    /* Transition fluide pour l'effet de glissement */
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    width: 300%; /* Largeur définie dynamiquement par JS normalement */
    margin: 0;
}

/* Les Slides individuels */
.qcs-slide {
    width: 33.333%; /* Ajusté par JS, mais fallback ici */
    flex-shrink: 0;
    padding: 40px;
    opacity: 0; /* Caché par défaut */
    transition: opacity 0.3s ease;
    pointer-events: none; /* Empêche de cliquer quand caché */
}

.qcs-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.qcs-slide h3 {
    margin: 0 0 25px 0;
    font-size: 26px;
    color: #111;
    font-weight: 800;
    letter-spacing: -0.5px;
}


/* ==========================================================================
   2. FORMULAIRE & INPUTS
   ========================================================================== */

.qcs-field {
    margin-bottom: 20px;
    width: 100%;
}

.qcs-field input,
.qcs-field textarea {
    width: 100% !important;
    padding: 15px;
    border: 2px solid #e1e1e1;
    border-radius: 12px;
    font-size: 16px;
    background: #f9f9f9;
    color: #333;
    transition: all 0.2s ease;
    max-width: 100%;
}

.qcs-field input:focus,
.qcs-field textarea:focus {
    border-color: #000;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
}

.qcs-field textarea {
    height: 140px;
    resize: none;
}


/* ==========================================================================
   3. BOUTONS
   ========================================================================== */

.qcs-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.qcs-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s;
}

.qcs-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.qcs-btn .arrow {
    margin-left: 8px;
    transition: transform 0.2s;
}

.qcs-btn:hover .arrow {
    transform: translateX(4px);
}

.qcs-btn-secondary {
    background: transparent;
    color: #666;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.qcs-btn-secondary:hover {
    color: #000;
    text-decoration: underline;
}


/* ==========================================================================
   4. MODULES SPÉCIFIQUES
   ========================================================================== */

/* --- A. Module : Honeypot (Sécurité Rond) --- */
.qcs-security-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #eee;
    padding: 10px 15px;
    border-radius: 50px;
    transition: border-color 0.3s;
}

.qcs-security-label {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

#qcs-color-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 2px solid #fff;
}

/* Style minimaliste pour l'input de sécurité */
#qcs_color_check {
    border: none !important;
    background: transparent !important;
    padding: 5px !important;
    font-size: 14px;
    color: #333;
    width: 100px !important;
    border-bottom: 1px solid #ddd !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#qcs_color_check:focus {
    border-bottom-color: #000 !important;
}

/* --- B. Module : Checkbox (Copie Email) --- */
.qcs-checkbox-wrapper {
    margin-bottom: 20px;
}

.qcs-checkbox-label {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    user-select: none;
}

.qcs-checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom Checkbox Design */
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 4px;
    transition: all 0.2s;
}

.qcs-checkbox-label:hover input ~ .checkmark {
    background-color: #ccc;
}

.qcs-checkbox-label input:checked ~ .checkmark {
    background-color: #000;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.qcs-checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

/* --- C. Module : Récapitulatif (Accordéon) --- */
.qcs-recap-box {
    background: #f8f9fa;
    border-left: 3px solid #000;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    transition: background 0.2s;
}

.qcs-recap-box:hover {
    background: #f0f0f0;
}

.qcs-recap-item {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
}

.qcs-recap-icon {
    margin-right: 10px;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

#qcs_recap_message {
    font-style: italic;
    color: #333;
    font-weight: 500;
    line-height: 1.5;
    
    /* Clamp (Couper le texte) */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Max 3 lignes */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}

#qcs_recap_message.expanded {
    -webkit-line-clamp: unset; /* Afficher tout */
}

.qcs-recap-hint {
    font-size: 10px;
    color: #999;
    text-align: right;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- D. Module : Succès --- */
.qcs-success-content {
    text-align: center;
    padding: 40px 20px;
}

.qcs-success-content h3 {
    margin-bottom: 10px;
}

.qcs-success-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.qcs-insta-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    font-weight: bold;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 50px;
    transition: opacity 0.3s;
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.3);
}

.qcs-insta-link:hover {
    opacity: 0.9;
    color: white;
    transform: translateY(-1px);
}


/* ==========================================================================
   5. ANIMATIONS
   ========================================================================== */

/* Animation de secousse (Erreur) */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-field {
    /* important pour écraser la couleur de bordure par défaut */
    border-color: #ff6b6b !important; 
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}


/* ==========================================================================
   6. RESPONSIVE
   ========================================================================== */

@media (max-width: 480px) {
    .qcs-slider-wrapper {
        margin: 20px auto;
        border-radius: 0; /* Pleine largeur sur mobile */
        box-shadow: none;
    }
    
    .qcs-slide {
        padding: 25px;
    }

    .qcs-recap-box {
        margin-left: -10px; /* Un peu plus large sur mobile */
        margin-right: -10px;
    }
}
