/* =========================================================
   ACADEMY AUTH THEME — IYF CI Academy
   Orange #FF5F05 / Bleu #0056A8
   ========================================================= */

:root {
    --academy-orange: #FF5F05;
    --academy-orange-light: rgba(255, 95, 5, 0.08);
    --academy-orange-medium: rgba(255, 95, 5, 0.15);
    --academy-blue: #0056A8;
    --academy-blue-light: rgba(0, 86, 168, 0.08);
    --academy-text: #1e293b;
    --academy-text-muted: #64748b;
    --academy-border: #e2e8f0;
    --academy-bg: #f0f4f8;
    --academy-white: #ffffff;
    --academy-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --academy-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    --academy-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 32px rgba(0, 0, 0, 0.06);
}

/* =========================================================
   BODY & BACKGROUND
   ========================================================= */

body {
    background: var(--academy-bg);
}

.auth-container {
    /* background: linear-gradient(155deg, #4b87c1 0%, #f0f4f8 35%, #eff6ff 65%, #fef7f1 100%); */
    background: linear-gradient(155deg, #4b87c1 0%, #f0f4f8 35%, #eff6ff 65%, #fe9150a6 100%);
    position: relative;
    overflow: hidden;
}

/* Blob orange — haut droite */
.auth-container::before {
    content: '';
    position: absolute;
    top: -180px;
    right: -140px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 95, 5, 0.12) 0%, rgba(255, 95, 5, 0.04) 45%, transparent 70%);
    pointer-events: none;
    animation: blobOrbitA 20s ease-in-out infinite alternate;
}

/* Blob bleu — bas gauche */
.auth-container::after {
    content: '';
    position: absolute;
    bottom: -140px;
    left: -100px;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 86, 168, 0.10) 0%, rgba(0, 86, 168, 0.03) 45%, transparent 70%);
    pointer-events: none;
    animation: blobOrbitB 18s ease-in-out infinite alternate;
}

/* Blob tertiaire — milieu bas (élément interne ajouté via JS ou pseudo de body) */
.auth-form {
    position: relative;
}

.auth-form::before {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -60px;
    width: 280px;
    height: 280px;
    border-radius: 60% 40% 55% 45%;
    background: radial-gradient(circle, rgba(255, 95, 5, 0.06) 0%, rgba(0, 86, 168, 0.04) 50%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: blobPulse 12s ease-in-out infinite alternate;
}

@keyframes blobOrbitA {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-40px, 30px) scale(1.08); }
}

@keyframes blobOrbitB {
    0% { transform: translate(0, 0) scale(1.05); }
    100% { transform: translate(30px, -20px) scale(1); }
}

@keyframes blobPulse {
    0% { transform: scale(1) rotate(0deg); border-radius: 60% 40% 55% 45%; }
    100% { transform: scale(1.15) rotate(8deg); border-radius: 40% 60% 45% 55%; }
}

/* =========================================================
   AUTH CARD
   ========================================================= */

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 680px;
    padding: 56px 60px;
    border-radius: 24px;
    background: var(--academy-white);
    box-shadow: var(--academy-shadow-card);
    border: 1px solid var(--academy-border);
    color: var(--academy-text);
}

/* =========================================================
   LOGO
   ========================================================= */

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo img {
    width: 110px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.06));
    transition: transform 0.3s;
}

.auth-logo img:hover {
    transform: scale(1.03);
}

/* =========================================================
   TITRES
   ========================================================= */

.auth-header {
    margin-bottom: 36px;
}

.auth-title {
    font-size: 30px;
    font-weight: 800;
    text-align: center;
    color: var(--academy-text);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--academy-text);
    margin-bottom: 10px;
    letter-spacing: -0.4px;
}

.auth-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    margin: 14px auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--academy-orange), var(--academy-blue));
}

.auth-title span {
    color: var(--academy-orange);
}

.auth-subtitle {
    text-align: center;
    color: var(--academy-text-muted);
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 0;
    line-height: 1.5;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================================
   FORM
   ========================================================= */

.auth-form > * {
    position: relative;
    z-index: 1;
}

label {
    font-size: 14px;
    font-weight: 600;
    color: var(--academy-text);
    margin-bottom: 8px;
    display: block;
    letter-spacing: 0.1px;
}

.form-control {
    width: 100%;
    padding: 15px 18px;
    border-radius: 12px;
    border: 1.5px solid var(--academy-border);
    background: #f8fafc;
    color: var(--academy-text);
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus {
    border-color: var(--academy-orange);
    outline: none;
    box-shadow: 0 0 0 4px var(--academy-orange-light);
    background: var(--academy-white);
}

/* ---- Password toggle ---- */
.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.15s;
}

.toggle-password:hover {
    color: var(--academy-orange);
}

/* ---- Row / Grid ---- */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.col-md-6 {
    flex: 1 1 calc(50% - 12px);
    min-width: 0;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.mb-5 {
    margin-bottom: 24px;
}

.mb-3 {
    margin-bottom: 14px;
}

.mt-2 {
    margin-top: 10px;
}

/* ---- Input wrapper ---- */
.input-wrapper {
    position: relative;
}

/* =========================================================
   REMEMBER / FORGOT
   ========================================================= */

.remember-forgot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-top: 4px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--academy-text-muted);
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--academy-orange);
    cursor: pointer;
}

.forgot-password-link {
    font-size: 14px;
    color: var(--academy-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}

.forgot-password-link:hover {
    color: var(--academy-orange);
}

/* =========================================================
   BUTTON
   ========================================================= */

.auth-btn {
    width: 100%;
    padding: 16px 28px;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 17px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--academy-orange) 0%, #ee5000 100%);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    margin-top: 28px;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 95, 5, 0.40);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =========================================================
   ALERT (erreur login)
   ========================================================= */

.alert {
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =========================================================
   AUTH LINK (register)
   ========================================================= */

.auth-link {
    margin-top: 28px;
    text-align: center;
    color: var(--academy-text-muted);
    font-size: 15px;
}

.auth-link a {
    color: var(--academy-orange);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.15s;
}

.auth-link a:hover {
    color: var(--academy-blue);
}

/* =========================================================
   SECTION LABEL
   ========================================================= */

.section-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--academy-text);
    margin-bottom: 18px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-label::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--academy-orange), var(--academy-blue));
}

/* =========================================================
   SELECT CARDS (choix académies)
   ========================================================= */

.card-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.select-card {
    position: relative;
    padding: 26px 22px;
    border-radius: 16px;
    background: #f8fafc;
    border: 2px solid var(--academy-border);
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
    text-align: center;
    overflow: hidden;
}

.select-card:hover {
    transform: translateY(-3px);
    border-color: var(--academy-orange);
    box-shadow: 0 6px 20px var(--academy-orange-light);
    background: rgba(255, 95, 5, 0.03);
}

.select-card.active {
    border-color: var(--academy-orange);
    background: var(--academy-orange-light);
    box-shadow: 0 0 0 4px var(--academy-orange-medium);
}

.select-card.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--academy-orange), var(--academy-blue));
    border-radius: 5px 0 0 5px;
}

.select-card.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 16px;
    color: var(--academy-orange);
}

.card-title {
    font-weight: 700;
    font-size: 17px;
    color: var(--academy-text);
    margin-bottom: 6px;
}

.select-card.active .card-title {
    color: var(--academy-orange);
}

.card-subtitle {
    font-size: 14px;
    color: var(--academy-text-muted);
    font-weight: 500;
}

.mt-30 {
    margin-top: 32px;
}

/* =========================================================
   STATUS PAGES (validation / end inscription)
   ========================================================= */

.status-hero {
    text-align: center;
    padding: 24px 0 16px;
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    font-size: 40px;
    margin-bottom: 24px;
}

.status-icon.clock {
    background: linear-gradient(135deg, rgba(255, 159, 10, 0.15), rgba(255, 95, 5, 0.12));
    color: var(--academy-orange);
    box-shadow: 0 4px 16px rgba(255, 95, 5, 0.15);
}

.status-icon.check {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(0, 86, 168, 0.10));
    color: #16a34a;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.15);
}

.status-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--academy-text);
    margin-bottom: 14px;
    line-height: 1.3;
}

.status-text {
    font-size: 15px;
    color: var(--academy-text-muted);
    line-height: 1.8;
    margin: 0;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.status-text strong {
    color: var(--academy-orange);
}

/* =========================================================
   FLASH MESSAGES (thème clair)
   ========================================================= */

.flash-message {
    font-family: 'Segoe UI', system-ui, sans-serif;
    border-radius: 10px;
}

.flash-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.flash-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.flash-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.flash-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* =========================================================
   UPLOAD BOX (profile info)
   ========================================================= */

.upload-box {
    border: 2px dashed var(--academy-border);
    border-radius: 16px;
    background: #f8fafc;
    transition: border-color 0.2s, background 0.2s;
    padding: 28px;
}

.upload-box:hover {
    border-color: var(--academy-orange);
    background: rgba(255, 95, 5, 0.02);
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {
    .auth-card {
        max-width: 580px;
        padding: 48px 44px;
    }

    .auth-title {
        font-size: 28px;
    }
}

@media (max-width: 992px) {
    .auth-card {
        max-width: 520px;
        padding: 40px 36px;
    }

    .card-group {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .auth-container {
        padding: 12px;
        align-items: flex-start;
    }

    .auth-container::before,
    .auth-container::after {
        display: none;
    }

    .auth-form::before {
        display: none;
    }

    .auth-card {
        max-width: 100%;
        border-radius: 20px;
        padding: 36px 24px;
        margin-top: 8px;
    }

    .auth-logo img {
        width: 90px;
    }

    .auth-title {
        font-size: 24px;
    }

    .auth-title::after {
        width: 40px;
        height: 3px;
        margin-top: 10px;
    }

    .auth-subtitle {
        font-size: 14px;
    }

    .row {
        flex-direction: column;
        gap: 18px;
    }

    .col-md-6 {
        flex: 0 0 100%;
    }

    .form-control {
        font-size: 16px;
        padding: 14px 16px;
    }

    .remember-forgot-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .card-group {
        grid-template-columns: 1fr;
    }

    .select-card {
        padding: 22px 18px;
    }

    .status-icon {
        width: 72px;
        height: 72px;
        font-size: 32px;
    }

    .status-title {
        font-size: 20px;
    }

    .section-label {
        font-size: 14px;
    }

    .auth-btn {
        padding: 15px 24px;
        font-size: 16px;
    }
}