/* ==========================================================================
   Examens v2 — page de demande de date d'examen
   ========================================================================== */

.exv2-container {
    max-width: var(--v2-container);
    margin: 0 auto;
    padding: var(--v2-gap-xl) var(--v2-pad-x);
}

.exv2-header {
    text-align: center;
    margin-bottom: var(--v2-gap-xl);
}

.exv2-header h1 {
    font-family: var(--v2-font-title);
    font-weight: 700;
    font-size: var(--v2-text-3xl);
    color: var(--v2-ink);
    margin-bottom: 0.75rem;
    position: relative;
    display: inline-block;
}

.exv2-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 3px;
    background: var(--v2-red);
    border-radius: var(--v2-radius-pill);
}

.exv2-header p {
    color: var(--v2-ink-2);
    max-width: 560px;
    margin: 1rem auto 0;
    line-height: 1.6;
}

/* --- Grille des offres ---------------------------------------------------- */

.exv2-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--v2-gap);
    margin-bottom: var(--v2-gap-xl);
}

.exv2-card {
    width: 100%;
    font-family: inherit;
    text-align: left;
    background: var(--v2-white);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-lg);
    padding: var(--v2-gap);
    transition: transform var(--v2-duration-base) var(--v2-ease-out),
                border-color var(--v2-duration-base) var(--v2-ease-out),
                box-shadow var(--v2-duration-base) var(--v2-ease-out);
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: var(--v2-shadow);
}

.exv2-card:hover {
    transform: translateY(-4px);
    border-color: var(--v2-blue);
    box-shadow: var(--v2-shadow-lift);
}

.exv2-card:active {
    transform: translateY(-1px);
}

.exv2-badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: var(--v2-text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.625rem;
    border-radius: var(--v2-radius-sm);
    background: var(--v2-blue-tint);
    color: var(--v2-blue);
}

.exv2-badge--lang {
    background: var(--v2-red-tint);
    color: var(--v2-red);
}

.exv2-icon {
    width: 46px;
    height: 46px;
    background: var(--v2-blue-tint);
    border-radius: var(--v2-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.375rem;
}

.exv2-card-title {
    font-family: var(--v2-font-title);
    font-weight: 700;
    font-size: var(--v2-text-lg);
    color: var(--v2-ink);
    margin-bottom: 0.5rem;
}

.exv2-card-desc {
    font-size: var(--v2-text-sm);
    color: var(--v2-ink-2);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.exv2-select-btn {
    background: transparent;
    color: var(--v2-blue);
    border: 1px solid var(--v2-border-soft);
    padding: 0.625rem;
    border-radius: var(--v2-radius-sm);
    font-weight: 700;
    text-align: center;
    font-size: var(--v2-text-sm);
    transition: background var(--v2-duration-fast) var(--v2-ease-out),
                color var(--v2-duration-fast) var(--v2-ease-out),
                border-color var(--v2-duration-fast) var(--v2-ease-out);
}

.exv2-card:hover .exv2-select-btn {
    background: var(--v2-blue);
    color: var(--v2-white);
    border-color: var(--v2-blue);
}

/* --- Formulaire ------------------------------------------------------------ */

.exv2-booking {
    background: var(--v2-blue-deep);
    border-radius: var(--v2-radius-lg);
    padding: var(--v2-gap-lg);
    color: var(--v2-white);
    box-shadow: var(--v2-shadow-lift);
    margin-bottom: var(--v2-gap-xl);
    scroll-margin-top: 2rem;
}

.exv2-booking-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--v2-gap-lg);
    align-items: center;
}

.exv2-booking-info h2 {
    font-family: var(--v2-font-title);
    font-weight: 700;
    font-size: var(--v2-text-2xl);
    margin-bottom: 0.75rem;
}

.exv2-booking-info h2 span {
    color: #ff9a9d;
}

.exv2-booking-info p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.exv2-steps {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exv2-step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.125rem;
    align-items: flex-start;
}

.exv2-step-num {
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--v2-text-xs);
    color: #ff9a9d;
    flex-shrink: 0;
}

.exv2-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.875rem;
    margin-bottom: 0.875rem;
}

.exv2-input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--v2-radius-sm);
    color: var(--v2-white);
    font-family: var(--v2-font-body);
    font-size: var(--v2-text-sm);
    outline: none;
    transition: border-color var(--v2-duration-fast) var(--v2-ease-out),
                background var(--v2-duration-fast) var(--v2-ease-out);
}

.exv2-input:focus {
    border-color: var(--v2-white);
    background: rgba(255, 255, 255, 0.1);
}

.exv2-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

select.exv2-input {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 2.5rem;
}

.exv2-input option,
.exv2-input optgroup {
    background-color: var(--v2-blue-dark);
    color: var(--v2-white);
}

.exv2-input option:disabled {
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
}

.exv2-submit {
    width: 100%;
    padding: 0.875rem;
    background: var(--v2-red);
    color: var(--v2-white);
    border: none;
    border-radius: var(--v2-radius-sm);
    font-weight: 700;
    font-size: var(--v2-text-sm);
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background var(--v2-duration-fast) var(--v2-ease-out),
                transform var(--v2-duration-fast) var(--v2-ease-out),
                box-shadow var(--v2-duration-fast) var(--v2-ease-out);
    margin-top: 0.5rem;
}

.exv2-submit:hover {
    transform: translateY(-1px);
}

.exv2-submit:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: inset 0 1px 3px rgba(23, 33, 43, 0.16);
}

.exv2-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* --- Notification toast (JS) ---------------------------------------------- */

.exv2-toast {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    padding: 1rem 1.5rem;
    border-radius: var(--v2-radius-sm);
    color: var(--v2-white);
    font-weight: 600;
    font-size: var(--v2-text-sm);
    box-shadow: var(--v2-shadow-lift);
    z-index: 9999;
    max-width: 380px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: exv2-slide-in 0.3s var(--v2-ease-out);
}

.exv2-toast--success { background: var(--v2-success); }
.exv2-toast--error { background: var(--v2-red); }

.exv2-toast.exv2-toast--out {
    animation: exv2-slide-out 0.3s var(--v2-ease-in-out) forwards;
}

@keyframes exv2-slide-in {
    from { transform: translateX(380px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes exv2-slide-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(380px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .exv2-toast,
    .exv2-toast.exv2-toast--out {
        animation: none;
    }
}

/* --- Responsive ------------------------------------------------------------- */

@media (max-width: 900px) {
    .exv2-booking {
        padding: var(--v2-gap);
    }

    .exv2-booking-grid {
        grid-template-columns: 1fr;
        gap: var(--v2-gap);
    }

    .exv2-steps { display: none; }

    .exv2-booking-info {
        text-align: center;
    }

    .exv2-booking-info h2 {
        font-size: var(--v2-text-xl);
    }
}

@media (max-width: 600px) {
    .exv2-grid {
        grid-template-columns: 1fr;
    }
}
