/* === VARIABLES === */
:root {
    --color-primary: #4230D6;
    --color-accent: #FF8000;
    --color-dark: #171615;
    --color-light: #F8F4EC;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Kanit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--color-dark);
    background-color: var(--color-light);
}

/* === CONTAINER === */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* === HERO === */
.callback-hero {
    position: relative;
    background: linear-gradient(135deg, #4230D6 0%, #6B5AE8 100%);
    color: white;
    padding: 60px 0;
    overflow: hidden;
}

.callback-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.callback-hero__title {
    font-family: 'Baloo 2', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.callback-hero__text {
    font-size: 1.125rem;
    opacity: 0.95;
    line-height: 1.6;
}

/* === MAIN LAYOUT === */
.callback-main {
    margin: 3rem auto;
    max-width: 1400px;
    padding: 0 1rem;
}

.callback-alert {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* GRILLE DESKTOP - LA CLÉ DU FIX */
.callback-main__grid {
    display: block; /* Mobile par défaut */
}

@media (min-width: 992px) {
    .callback-main__grid {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 50% / 50% */
        gap: 2rem;
        align-items: start;
    }
}

/* Colonne gauche (calendrier + créneaux) */
.callback-main__left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* === CARDS === */
.callback-card {
    background: white;
    border-radius: 0.875rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    width: 100%; /* IMPORTANT: force la largeur */
    max-width: 100%; /* IMPORTANT: empêche le débordement */
}

@media (min-width: 992px) {
    .callback-card {
        padding: 1.25rem;
    }
}

.callback-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 0.875rem;
    border-bottom: 2px solid #f3f4f6;
}

.callback-card__title {
    font-family: 'Baloo 2', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #171615;
    margin: 0;
}

@media (min-width: 992px) {
    .callback-card__title {
        font-size: 1.125rem;
    }
}

.callback-nav-btn {
    padding: 0.625rem;
    color: #4230D6;
    transition: all 0.2s;
    border: none;
    background: none;
    border-radius: 0.5rem;
    cursor: pointer;
}

.callback-nav-btn:hover {
    background: #f3f4f6;
    transform: scale(1.05);
}

/* === CALENDRIER MENSUEL === */
.callback-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.callback-weekday {
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    padding: 0.375rem;
}

.callback-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.callback-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: none;
    min-height: 40px;
    cursor: pointer;
}

@media (min-width: 992px) {
    .callback-day {
        min-height: 38px;
        font-size: 0.8125rem;
    }
}

.callback-day--empty {
    background: transparent;
}

.callback-day--selectable {
    background: #f9fafb;
    color: #171615;
}

.callback-day--selectable:hover {
    background: rgba(66, 48, 214, 0.1);
    border-color: #4230D6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(66, 48, 214, 0.15);
}

.callback-day--selected {
    background: #4230D6 !important;
    color: white !important;
    box-shadow: 0 6px 12px rgba(66, 48, 214, 0.4);
    transform: scale(1.08);
}

.callback-day--disabled {
    background: #f3f4f6;
    color: #d1d5db;
    cursor: not-allowed;
    opacity: 0.5;
}

/* === VUE SEMAINE === */
.callback-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.callback-week-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 0.5rem;
    border-radius: 0.625rem;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: none;
    min-height: 80px;
    cursor: pointer;
}

@media (min-width: 992px) {
    .callback-week-day {
        min-height: 70px;
        padding: 0.75rem 0.4rem;
    }
}

.callback-week-day--selectable {
    background: #f9fafb;
}

.callback-week-day--selectable:hover {
    background: rgba(66, 48, 214, 0.1);
    border-color: #4230D6;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(66, 48, 214, 0.15);
}

.callback-week-day--selected {
    background: #4230D6 !important;
    color: white !important;
    box-shadow: 0 6px 12px rgba(66, 48, 214, 0.4);
    transform: scale(1.08);
}

.callback-week-day--disabled {
    background: #f3f4f6;
    color: #d1d5db;
    cursor: not-allowed;
    opacity: 0.5;
}

.callback-week-day__weekday {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.callback-week-day__date {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.25rem 0;
}

@media (min-width: 992px) {
    .callback-week-day__date {
        font-size: 1.35rem;
    }
}

.callback-week-day__month {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    text-transform: capitalize;
}

/* === INFO ALERT === */
.callback-info {
    border: 2px solid #bfdbfe;
    background: #dbeafe;
    border-radius: 0.625rem;
    padding: 1rem;
    margin-top: 1rem;
}

.callback-info__title {
    font-weight: 700;
    margin-bottom: 0.375rem;
    font-size: 0.9375rem;
    color: #1e40af;
}

.callback-info__text {
    font-size: 0.8125rem;
    color: #1e3a8a;
    line-height: 1.5;
    margin: 0;
}

/* === CRÉNEAUX HORAIRES === */
.callback-slots__header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

@media (min-width: 992px) {
    .callback-slots__header {
        margin-bottom: 1.25rem;
        padding-bottom: 0.875rem;
    }
}

.callback-slots__title {
    font-family: 'Baloo 2', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #171615;
    margin-bottom: 0.5rem;
}

@media (min-width: 992px) {
    .callback-slots__title {
        font-size: 1.125rem;
    }
}

.callback-slots__date {
    color: #6b7280;
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.callback-slots__section {
    margin-bottom: 2rem;
}

@media (min-width: 992px) {
    .callback-slots__section {
        margin-bottom: 1.5rem;
    }
}

.callback-slots__section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 128, 0, 0.05);
    border-radius: 0.5rem;
}

.callback-slots__section-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #FF8000;
    margin: 0;
}

.callback-slots__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 0.75rem;
}

@media (min-width: 992px) {
    .callback-slots__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.625rem;
    }
}

@media (min-width: 1200px) {
    .callback-slots__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.callback-slot {
    padding: 0.875rem;
    border-radius: 0.625rem;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    font-size: 1rem;
}

@media (min-width: 992px) {
    .callback-slot {
        padding: 0.625rem;
        font-size: 0.875rem;
    }
}

.callback-slot:hover {
    background: rgba(66, 48, 214, 0.1);
    border-color: #4230D6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(66, 48, 214, 0.15);
}

.callback-slot--selected {
    background: #4230D6 !important;
    color: white !important;
    border-color: #4230D6 !important;
    box-shadow: 0 6px 12px rgba(66, 48, 214, 0.4);
    transform: scale(1.08);
}

.callback-slot--disabled {
    background: #f3f4f6;
    color: #d1d5db;
    border-color: #e5e7eb;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.callback-slot--disabled:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
    transform: none;
}

/* === FORMULAIRE === */
.callback-form {
    animation: fadeIn 0.4s ease-out;
}

@media (min-width: 992px) {
    .callback-form {
        position: sticky;
        top: 2rem;
    }
}

.callback-form__header {
    margin-bottom: 2rem;
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(66, 48, 214, 0.05) 0%, rgba(196, 169, 250, 0.05) 100%);
    border-radius: 0.75rem;
}

.callback-form__title {
    font-family: 'Baloo 2', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #171615;
    margin-bottom: 0.5rem;
}

.callback-form__subtitle {
    color: #6b7280;
    margin: 0;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.callback-form__label {
    display: flex;
    align-items: center;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.625rem;
}

.callback-form__label svg {
    margin-right: 0.5rem;
    color: #4230D6;
}

.callback-form__input,
.callback-form__textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.625rem;
    font-size: 1rem;
    transition: all 0.2s;
    font-family: inherit;
}

.callback-form__input:focus,
.callback-form__textarea:focus {
    outline: none;
    border-color: #4230D6;
    box-shadow: 0 0 0 4px rgba(66, 48, 214, 0.1);
}

.callback-form__textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-check {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.callback-form__checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.callback-form__checkbox:checked {
    background-color: #4230D6;
    border-color: #4230D6;
}

.callback-form__check-label {
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    line-height: 1.5;
}

.callback-form__submit {
    background: #FF8000;
    color: white;
    padding: 1.125rem 2rem;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 6px 12px rgba(255, 128, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.callback-form__submit:hover {
    background: #FF9420;
    box-shadow: 0 8px 16px rgba(255, 128, 0, 0.4);
    transform: translateY(-2px);
}

/* === UTILITAIRES === */
.d-none {
    display: none !important;
}

.d-flex {
    display: flex;
}

.gap-2 {
    gap: 0.5rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

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

/* === CTA FINAL === */
.callback-cta {
    background: linear-gradient(135deg, rgba(66, 48, 214, 0.05) 0%, rgba(196, 169, 250, 0.05) 100%);
    padding: 4rem 0;
    margin-top: 4rem;
    text-align: center;
}

.callback-cta__title {
    font-family: 'Baloo 2', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #171615;
    margin-bottom: 1rem;
}

.callback-cta__text {
    color: #6b7280;
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.callback-cta__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.callback-cta__btn {
    padding: 1rem 2.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.0625rem;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
}

.callback-cta__btn--primary {
    background: #4230D6;
    color: white;
    border: 2px solid #4230D6;
    box-shadow: 0 6px 12px rgba(66, 48, 214, 0.3);
}

.callback-cta__btn--primary:hover {
    background: #5640E0;
    transform: translateY(-2px);
}

.callback-cta__btn--secondary {
    background: white;
    color: #4230D6;
    border: 2px solid #4230D6;
}

.callback-cta__btn--secondary:hover {
    background: #4230D6;
    color: white;
    transform: translateY(-2px);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .callback-hero__title {
        font-size: 1.75rem;
    }
    
    .callback-day {
        min-height: 50px;
        font-size: 0.9375rem;
    }
    
    .callback-week-day {
        min-height: 75px;
    }
    
    .callback-form__title {
        font-size: 1.5rem;
    }
}
