/**
 * FFMSC Tarificateur - CSS ULTRA PRO
 * Version: 2.0.0
 */

/* Variables CSS */
:root {
    --primary-color: #2980b9;
    --primary-dark: #1f618d;
    --primary-light: #3498db;
    --secondary-color: #00b4db;
    --success-color: #27ae60;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8fbff;
    --shadow-sm: 0 4px 15px rgba(41, 128, 185, 0.1);
    --shadow-md: 0 10px 30px rgba(41, 128, 185, 0.15);
    --shadow-lg: 0 20px 60px rgba(41, 128, 185, 0.2);
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Container principal */
#ffmsc-tarificateur {
    max-width: 800px;
    margin: 60px auto;
    padding: 50px 40px;
    background: white;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    position: relative;
    overflow: hidden;
}

#ffmsc-tarificateur::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light), var(--secondary-color));
}

/* Header magnifique */
.tarif-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.tarif-header h2 {
    font-size: 2.8em;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.tarif-header p {
    font-size: 1.15em;
    color: var(--text-light);
    font-weight: 400;
}

/* Steps indicator moderne */
.tarif-steps-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto 50px;
    max-width: 600px;
    position: relative;
    padding: 0 20px;
}

.tarif-steps-indicator::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 15%;
    right: 15%;
    height: 3px;
    background: linear-gradient(90deg, #ecf0f1 0%, #ecf0f1 100%);
    z-index: 0;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    border: 3px solid #ecf0f1;
    color: #bdc3c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 12px;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.step-indicator.active .step-circle {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(41, 128, 185, 0.4);
    transform: scale(1.1);
}

.step-indicator.completed .step-circle {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.step-label {
    font-size: 0.85em;
    color: var(--text-light);
    text-align: center;
    font-weight: 500;
    max-width: 80px;
}

.step-indicator.active .step-label {
    color: var(--primary-color);
    font-weight: 700;
}

/* Steps animation */
.tarif-step {
    display: none;
}

.tarif-step.active {
    display: block;
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Form groups */
.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1em;
    letter-spacing: 0.2px;
}

.form-group label .required {
    color: #e74c3c;
    margin-left: 3px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #ecf0f1;
    border-radius: 15px;
    font-size: 1em;
    transition: var(--transition);
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

/* Section conjoint */
#conjoint-section {
    display: none;
    padding: 25px;
    background: linear-gradient(135deg, #f8fbff 0%, #e8f4f8 100%);
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    border: 2px solid rgba(52, 152, 219, 0.1);
}

/* Buttons ultra pro */
.btn {
    padding: 16px 35px;
    border: none;
    border-radius: 50px;
    font-size: 1.05em;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 6px 20px rgba(41, 128, 185, 0.3);
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(41, 128, 185, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(41, 128, 185, 0.1);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    padding: 18px 40px;
    font-size: 1.15em;
}

/* Nombre d'enfants selector */
.nombre-enfants-selector {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.nombre-enfants-btn {
    padding: 18px 10px;
    background: white;
    border: 2px solid #ecf0f1;
    border-radius: 15px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1em;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-dark);
}

.nombre-enfants-btn:hover {
    background: #f8fbff;
    border-color: var(--primary-light);
    transform: translateY(-3px);
}

.nombre-enfants-btn.selected {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(41, 128, 185, 0.3);
    transform: translateY(-3px);
}

/* Formules cards */
.formules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.formule-card {
    padding: 25px 15px;
    background: linear-gradient(135deg, #f8fbff 0%, #e8f4f8 100%);
    border: 3px solid transparent;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.formule-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius);
    padding: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: var(--transition);
}

.formule-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.formule-card:hover::before {
    opacity: 1;
}

.formule-card.selected {
    background: white;
    border-color: var(--primary-light);
    box-shadow: 0 10px 40px rgba(41, 128, 185, 0.25);
    transform: translateY(-8px) scale(1.05);
}

.formule-name {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.formule-description {
    font-size: 0.85em;
    color: var(--text-light);
}

/* Results section magnifique */
.tarif-results {
    text-align: center;
    padding: 50px 40px;
    background: linear-gradient(135deg, #f8fbff 0%, #e8f4f8 100%);
    border-radius: 25px;
    margin-bottom: 35px;
    position: relative;
    overflow: hidden;
}

.tarif-results::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, 20px) rotate(180deg); }
}

.tarif-results h3 {
    font-size: 1.3em;
    color: var(--text-light);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.tarif-amount {
    font-size: 5em;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    line-height: 1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.tarif-period {
    font-size: 1.3em;
    color: var(--text-light);
    margin-bottom: 20px;
    font-weight: 500;
}

.tarif-year {
    font-size: 0.95em;
    color: #95a5a6;
    font-style: italic;
    padding: 8px 20px;
    background: white;
    border-radius: 20px;
    display: inline-block;
}

.tarif-details {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    margin-top: 30px;
    box-shadow: var(--shadow-sm);
}

.detail-line {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #ecf0f1;
    font-size: 1.05em;
}

.detail-line:last-child {
    border-bottom: none;
    padding-top: 20px;
    margin-top: 10px;
    border-top: 2px solid var(--primary-light);
}

.detail-line span:first-child {
    color: var(--text-light);
    font-weight: 500;
}

.detail-line span:last-child {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.1em;
}

/* Contact form grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.contact-grid .form-group.full-width {
    grid-column: 1 / -1;
}

/* Success page */
.success-page {
    text-align: center;
    padding: 50px 30px;
}

.success-icon {
    font-size: 100px;
    margin-bottom: 30px;
    animation: successBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successBounce {
    0% { transform: scale(0) rotate(-180deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.success-page h3 {
    font-size: 2.5em;
    color: var(--success-color);
    margin-bottom: 20px;
    font-weight: 800;
}

.success-page p {
    font-size: 1.15em;
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.7;
}

/* LOADER MAGNIFIQUE */
#ffmsc-loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#ffmsc-loader.active {
    display: flex;
}

.loader-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.loader-logo {
    width: 120px;
    height: 120px;
    animation: logoSpin 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    filter: drop-shadow(0 10px 30px rgba(52, 152, 219, 0.5));
}

@keyframes logoSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

.loader-spinner {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-light);
    border-right-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes spin {
    to { transform: translateX(-50%) rotate(360deg); }
}

#ffmsc-loader p {
    color: white;
    font-size: 1.3em;
    font-weight: 600;
    letter-spacing: 1px;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Notifications */
.ffmsc-notification {
    position: fixed;
    top: 30px;
    right: 30px;
    padding: 20px 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 100000;
    display: none;
    animation: slideInRight 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 300px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ffmsc-notification.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.ffmsc-notification.success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

/* Footer */
.tarif-footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #ecf0f1;
}

.copyright {
    font-size: 0.9em;
    color: #95a5a6;
    font-weight: 500;
}

.copyright a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.copyright a:hover {
    color: var(--primary-light);
}

/* Responsive */
@media (max-width: 768px) {
    #ffmsc-tarificateur {
        padding: 35px 25px;
        margin: 30px 15px;
    }

    .tarif-header h2 {
        font-size: 2.2em;
    }

    .tarif-amount {
        font-size: 3.5em;
    }

    .formules-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .nombre-enfants-selector {
        grid-template-columns: repeat(3, 1fr);
    }

    .ffmsc-notification {
        right: 15px;
        left: 15px;
        top: 15px;
    }
}
/* Groupes de boutons */
.buttons-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    margin-top: 30px;
}

/* Boutons mega (principaux) */
.btn-mega {
    padding: 20px 50px;
    font-size: 1.2em;
    min-width: 320px;
    box-shadow: 0 8px 25px rgba(41, 128, 185, 0.35);
    font-weight: 800;
    letter-spacing: 0.5px;
}

.btn-mega:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 35px rgba(41, 128, 185, 0.45);
}

.btn-mega::after {
    content: '→';
    margin-left: 10px;
    display: inline-block;
    transition: var(--transition);
}

.btn-mega:hover::after {
    transform: translateX(5px);
}

/* Bouton normal (secondaire) */
.btn-normal {
    padding: 14px 35px;
    font-size: 1em;
    min-width: 260px;
}

/* Style alternatif pour btn-full centré */
.btn-full {
    display: inline-flex;
    max-width: 400px;
    margin: 0 auto;
}

/* Animation pulse sur les boutons principaux */
@keyframes buttonPulse {
    0% {
        box-shadow: 0 8px 25px rgba(41, 128, 185, 0.35);
    }
    50% {
        box-shadow: 0 8px 25px rgba(41, 128, 185, 0.5), 0 0 30px rgba(41, 128, 185, 0.2);
    }
    100% {
        box-shadow: 0 8px 25px rgba(41, 128, 185, 0.35);
    }
}

.btn-mega.btn-primary {
    animation: buttonPulse 3s ease-in-out infinite;
}

.btn-mega.btn-primary:hover {
    animation: none;
}

/* Responsive buttons */
@media (max-width: 768px) {
    .btn-mega {
        min-width: 100%;
        padding: 18px 30px;
        font-size: 1.1em;
    }
    
    .btn-normal {
        min-width: 100%;
    }
    
    .buttons-group {
        width: 100%;
    }
}