/* Styles modernes pour KADAFIA SERVICES INTER */

/* Importation de la police Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* Variables */
:root {
    --primary-color: #e63946;
    --primary-dark: #c1121f;
    --primary-light: #ff8a94;
    --secondary-color: #1e1e2f;
    --accent-color: #f8c630;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-color: #f8f9fa;
    --dark-color: #2c3e50;
    --gray-color: #95a5a6;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-danger: linear-gradient(135deg, #e63946 0%, #c1121f 100%);
    --gradient-success: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    --box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    --box-shadow-hover: 0 20px 60px rgba(0,0,0,0.15);
    --box-shadow-primary: 0 10px 40px rgba(230, 57, 70, 0.3);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Styles généraux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Animation de fond avec particules */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.animated-bg span {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    animation: animate 25s linear infinite;
    bottom: -150px;
    border-radius: 50%;
}

.animated-bg span:nth-child(1) { left: 25%; width: 80px; height: 80px; animation-delay: 0s; }
.animated-bg span:nth-child(2) { left: 10%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 12s; }
.animated-bg span:nth-child(3) { left: 70%; width: 20px; height: 20px; animation-delay: 4s; }
.animated-bg span:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-delay: 0s; animation-duration: 18s; }
.animated-bg span:nth-child(5) { left: 65%; width: 20px; height: 20px; animation-delay: 0s; }
.animated-bg span:nth-child(6) { left: 75%; width: 110px; height: 110px; animation-delay: 3s; }
.animated-bg span:nth-child(7) { left: 35%; width: 150px; height: 150px; animation-delay: 7s; }
.animated-bg span:nth-child(8) { left: 50%; width: 25px; height: 25px; animation-delay: 15s; animation-duration: 45s; }
.animated-bg span:nth-child(9) { left: 20%; width: 15px; height: 15px; animation-delay: 2s; animation-duration: 35s; }
.animated-bg span:nth-child(10) { left: 85%; width: 150px; height: 150px; animation-delay: 0s; animation-duration: 11s; }

@keyframes animate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}

/* En-tête */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    padding: 4rem 0 !important;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
    opacity: 0.1;
    animation: wave 10s linear infinite;
}

@keyframes wave {
    0% { background-position-x: 0; }
    100% { background-position-x: 1440px; }
}

/* Formes flottantes */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 70px;
    height: 70px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Logo */
.logo {
    max-height: 100px;
    width: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
    transition: var(--transition);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.logo:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 15px 30px rgba(230, 57, 70, 0.4));
}

/* Badge moderne */
.badge-modern {
    display: inline-block;
    padding: 10px 25px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Carte principale */
.card {
    border: none;
    border-radius: 30px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    margin-bottom: 30px;
}

.card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--box-shadow-hover);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border: none;
    position: relative;
    overflow: hidden;
}

.card-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Fieldsets modernes */
fieldset {
    border: none;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

fieldset::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    transition: var(--transition);
}

fieldset:hover {
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

fieldset:hover::before {
    width: 10px;
}

legend {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    width: auto;
    margin-left: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    animation: legendPulse 2s infinite;
}

@keyframes legendPulse {
    0%, 100% { box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 10px 25px rgba(102, 126, 234, 0.5); }
}

/* Groupes de formulaire */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.form-label i {
    color: #667eea;
    font-size: 1rem;
}

.form-group:hover .form-label {
    color: #667eea;
    transform: translateX(5px);
}

/* Champs de formulaire */
.form-control, .form-select {
    border-radius: 15px;
    border: 2px solid #e0e0e0;
    transition: var(--transition);
    padding: 14px 20px;
    font-size: 0.95rem;
    background: #f8f9fa;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
    transform: translateY(-3px);
    background: white;
}

.form-control:hover, .form-select:hover {
    border-color: #764ba2;
}

/* Options d'expérience */
.experience-options {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 15px;
    border: 2px solid #e0e0e0;
    transition: var(--transition);
}

.experience-options:hover {
    border-color: #667eea;
    background: white;
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-right: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-label {
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.form-check:hover .form-check-label {
    color: #667eea;
}

/* Bouton de soumission */
.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 40px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-submit:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
    color: white;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:active {
    transform: translateY(-2px) scale(1.02);
}

/* Zone de soumission */
.submit-zone {
    position: relative;
    padding: 20px;
}

.form-message {
    color: #2ecc71;
    font-weight: 500;
    min-height: 30px;
}

/* Footer moderne */
.footer-modern {
    background: linear-gradient(135deg, #1e1e2f 0%, #2c3e50 100%);
    position: relative;
    overflow: hidden;
}

.footer-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #e63946);
    animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.social-links a {
    display: inline-block;
    transition: var(--transition);
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.social-links a:hover {
    transform: translateY(-5px) rotate(360deg);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
}

/* Modals modernes */
.modal-modern {
    border: none;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--box-shadow-hover);
}

.modal-header {
    border-bottom: none;
    padding: 20px 30px;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    border-top: none;
    padding: 20px 30px;
}

/* Spinner moderne */
.spinner-modern {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: #667eea;
    border-bottom-color: #764ba2;
    animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border-top-color: #764ba2;
    border-bottom-color: #e63946;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    border-top-color: #e63946;
    border-bottom-color: #667eea;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animation de succès */
.success-animation {
    animation: successPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Media Queries */
@media (max-width: 768px) {
    header {
        padding: 2rem 0 !important;
    }
    
    .logo {
        max-height: 70px;
    }
    
    h1.display-5 {
        font-size: 1.8rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .card {
        margin: 0 15px;
    }
    
    fieldset {
        padding: 20px 15px;
    }
    
    legend {
        font-size: 0.9rem;
        padding: 8px 20px;
        margin-left: 10px;
    }
    
    .btn-submit {
        width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .footer-modern .row {
        text-align: center;
    }
    
    .social-links {
        margin-top: 15px;
    }
}

@media (max-width: 576px) {
    .logo {
        max-height: 50px;
    }
    
    h1.display-5 {
        font-size: 1.3rem;
    }
    
    .badge-modern {
        font-size: 0.8rem;
        padding: 8px 15px;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    fieldset {
        padding: 15px 10px;
    }
    
    .form-control, .form-select {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .form-label {
        font-size: 0.8rem;
    }
    
    .modal-body {
        padding: 20px;
    }
}

/* Animations supplémentaires */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Classes d'animation */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* Effets de survol pour les champs */
.form-group {
    position: relative;
}

.form-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: var(--transition);
    transform: translateX(-50%);
}

.form-group:hover::after {
    width: 100%;
}

/* Validation styles */
.form-control.is-valid {
    border-color: #2ecc71;
    background-image: none;
}

.form-control.is-invalid {
    border-color: #e74c3c;
    background-image: none;
}

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Selection */
::selection {
    background: #667eea;
    color: white;
}

::-moz-selection {
    background: #667eea;
    color: white;
}