/* =========================
   BASE
========================= */

.ae-dashboard,
.ae-dashboard * {
    box-sizing: border-box;
}

.ae-dashboard {
    width: 100%;
    max-width: 1230px;
    margin: 30px auto 60px;
    padding: 0 14px;
    font-family: Arial, Helvetica, sans-serif;
}

.ae-page-transition {
    animation: aeFadeIn 0.3s ease;
}

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

/* =========================
   CARD PRINCIPALE
========================= */

.ae-card {
    background: #ffffff;
    border: 1px solid #d9e4f1;
    border-radius: 6px;
    padding: 26px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.04);
}

/* =========================
   ALERTES
========================= */

.ae-alert {
    display: block;
    width: 100%;
    padding: 14px 18px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.ae-alert.ae-info {
    background: #eef5ff;
    border: 1px solid #bfd5ff;
    color: #2563eb;
}

.ae-alert.ae-warning {
    background: #fff7e8;
    border: 1px solid #f1d089;
    color: #8a5a00;
}

.ae-mb-30 {
    margin-bottom: 30px;
}

/* =========================
   BLOC UTILISATEUR
========================= */

.ae-user {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.ae-user-avatar {
    width: 100px;
    min-width: 100px;
}

.ae-user-avatar img {
    width: 100px;
    height: 100px;
    display: block;
    object-fit: cover;
    border-radius: 5px !important;
}

.ae-user-content {
    flex: 1;
    min-width: 0;
}

.ae-user-name {
    font-size: 16px;
    font-weight: 400;
    color: #444444;
    margin-bottom: 4px;
    line-height: 1.4;
}

.ae-last-login {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 16px;
    line-height: 1.4;
}

/* =========================
   LIENS BADGES
========================= */

.ae-user-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.ae-user-links a.ae-link-animated {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px !important;
    border: 1px solid #d7e1ee !important;
    border-radius: 6px !important;
    background: #f8fbff !important;
    color: #4b5563 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    position: relative;
    transition: all 0.2s ease !important;
}

.ae-user-links a.ae-link-animated::after {
    content: "↗";
    position: absolute;
    left: 10px;
    bottom: -16px;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1;
}

.ae-user-links a.ae-link-animated:hover {
    background: #f1f6fd !important;
    border-color: #bfd3eb !important;
    color: #0b84d8 !important;
}

/* =========================
   GRILLE
========================= */

.ae-grid {
    display: grid;
    gap: 20px;
}

.ae-grid.ae-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* =========================
   TUILES
========================= */

.ae-tile {
    background: #ffffff;
    border: 1px solid #dbe4f0;
    border-radius: 6px;
    min-height: 143px;
    transition: all 0.2s ease;
    overflow: hidden;
}

.ae-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.ae-tile a {
    display: block;
    width: 100%;
    height: 100%;
    padding: 22px 22px 20px;
    text-decoration: none !important;
}

.ae-tile-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: #222222;
    margin-bottom: 12px;
}

.ae-tile-text {
    font-size: 15px;
    line-height: 1.45;
    color: #6b7280;
}

.ae-hover-card:hover {
    border-color: #cfdceb;
}

/* =========================
   TUILE DECONNEXION
========================= */

.ae-logout {
    background: #fff5f5 !important;
    border: 1px solid #ffd6d6 !important;
}

.ae-logout .ae-tile-title {
    color: #ef2b2d !important;
}

.ae-logout .ae-tile-text {
    color: #ff5a5f !important;
}

.ae-logout:hover {
    background: #fff0f0 !important;
    border-color: #ffc0c0 !important;
}

/* =========================
   FOOTER
========================= */

.ae-footer {
    margin-top: 35px;
    font-size: 15px;
    color: #444444;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {
    .ae-grid.ae-grid-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .ae-grid.ae-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ae-user {
        flex-direction: column;
    }

    .ae-user-avatar {
        width: 90px;
        min-width: 90px;
    }

    .ae-user-avatar img {
        width: 90px;
        height: 90px;
    }
}

@media (max-width: 560px) {
    .ae-dashboard {
        margin-top: 20px;
        padding: 0 10px;
    }

    .ae-card {
        padding: 16px;
    }

    .ae-grid.ae-grid-4 {
        grid-template-columns: 1fr;
    }

    .ae-tile {
        min-height: auto;
    }

    .ae-tile a {
        padding: 18px 16px;
    }

    .ae-user-links a.ae-link-animated::after {
        display: none;
    }
}

/* =========================================================
   AUTH PREMIUM
========================================================= */

.ae-auth-shell {
    max-width: 1230px;
    margin: 40px auto 70px;
    padding: 0 20px;
}

.ae-auth-card {
    max-width: 640px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #dde6ef;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
    padding: 42px;
}

.ae-auth-card-wide {
    max-width: 860px;
}

.ae-auth-header {
    margin-bottom: 28px;
}

.ae-auth-kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #0b84d8;
    margin-bottom: 10px;
}

.ae-auth-title {
    font-family: 'Poppins', sans-serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.15;
    color: #111827;
    margin: 0 0 10px;
}

.ae-auth-subtitle {
    font-size: 15px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
}

.ae-auth-form-premium {
    margin-top: 10px;
}

.ae-auth-actions {
    margin-top: 28px;
}

.ae-auth-btn {
    min-width: 220px;
    height: 48px;
    padding: 0 28px;
    background: #111827;
    color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
}

.ae-auth-btn:hover {
    background: #000000;
    transform: translateY(-1px);
}

.ae-auth-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eef2f7;
    font-size: 14px;
    color: #6b7280;
}

.ae-auth-footer a {
    color: #0b84d8;
    font-weight: 600;
}

.ae-auth-footer a:hover {
    color: #086eb4;
}

@media (max-width: 768px) {
    .ae-auth-card {
        padding: 24px;
        border-radius: 10px;
    }

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

    .ae-auth-btn {
        width: 100%;
        min-width: 0;
    }
}