* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f4f6f9;
    color: #212529;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 0;
}

h1 {
    margin-top: 0;
}
/* ===== EN-TÊTE SMARTSCOLAID ===== */

.main-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 10px rgba(15, 42, 64, 0.06);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

/* Logo SmartScolaID */
.logo {
    color: #0f2a40;
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo::after {
    content: "";
}

.logo:hover {
    text-decoration: none;
    opacity: 0.9;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;

    color: #0f2a40;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;

    border-radius: 10px;
    transition: 0.2s ease;
}

.main-nav a:hover {
    color: #ff7a00;
    background: #fff4e8;
    text-decoration: none;
}

/* Le dernier lien devient le bouton principal */
.main-nav .btn-connexion {
    color: #ffffff;
    background: #ff7a00;
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.20);
}

.main-nav .btn-connexion:hover {
    color: #ffffff;
    background: #e96f00;
    transform: translateY(-1px);
}

/* Adaptation téléphone */
@media (max-width: 600px) {
    .header-content {
        min-height: 64px;
    }

    .logo {
        font-size: 20px;
    }

    .main-nav {
        gap: 5px;
    }

    .main-nav a {
        min-height: 38px;
        padding: 0 11px;
        font-size: 14px;
    }
}
.login-section {
    display: flex;
    justify-content: center;
    padding: 50px 0;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 30px;
    background-color: #ffffff;
    border: 1px solid #dcdfe3;
    border-radius: 8px;
}

.login-card h1 {
    margin-bottom: 10px;
}

.login-description {
    margin-bottom: 25px;
    color: #6c757d;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #6c757d;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    background-color: #212529;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #343a40;
}

.login-section {
    display: flex;
    justify-content: center;
    padding: 50px 0;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 30px;
    background-color: #ffffff;
    border: 1px solid #dcdfe3;
    border-radius: 8px;
}

.login-card h1 {
    margin-bottom: 10px;
}

.login-description {
    margin-bottom: 25px;
    color: #6c757d;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #6c757d;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    background-color: #212529;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #343a40;
}
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.dashboard-card {
    display: block;
    padding: 25px;
    background-color: #ffffff;
    border: 1px solid #dcdfe3;
    border-radius: 8px;
    text-decoration: none;
    color: #212529;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

.dashboard-card h2 {
    margin-top: 0;
}

.dashboard-card p {
    margin-bottom: 0;
    color: #6c757d;
}

.btn-danger {
    display: inline-block;
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 5px;
    background-color: #dc3545;
    color: #ffffff;
}
.table-container {
    width: 100%;
    overflow-x: auto;
    background-color: #ffffff;
    border: 1px solid #dcdfe3;
    border-radius: 8px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.data-table th {
    background-color: #f8f9fa;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}
.form-card {
    width: 100%;
    max-width: 700px;
    padding: 30px;
    background-color: #ffffff;
    border: 1px solid #dcdfe3;
    border-radius: 8px;
}

.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 16px;
    background-color: #ffffff;
}

.actions {
    white-space: nowrap;
}

.btn-action,
.btn-delete {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

.btn-action {
    border: 1px solid #6c757d;
    background-color: #ffffff;
    color: #212529;
}

.btn-delete {
    border: none;
    background-color: #dc3545;
    color: #ffffff;
}

.dashboard-header .btn-primary {
    width: auto;
    display: inline-block;
    padding: 10px 18px;
    text-decoration: none;
}

.card-page-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 30px;
}

.btn-print-card {
    width: auto;
    display: inline-block;
    padding: 10px 18px;
}

.school-card-print-area {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px 0;
}

.school-card {
    width: 85.6mm;
    height: 54mm;
    box-sizing: border-box;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #222222;
    border-radius: 3mm;
    font-family: Arial, sans-serif;
    position: relative;
}

.school-card-header {
    height: 9mm;
    box-sizing: border-box;
    padding: 1.5mm 3mm;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #202428;
    color: #ffffff;
}

.school-card-brand {
    font-size: 4mm;
    font-weight: 700;
}

.school-card-year {
    text-align: right;
    font-size: 2.3mm;
    line-height: 1.25;
}

.school-card-year strong {
    display: block;
    font-size: 3mm;
}

.school-card-school {
    text-align: center;
    font-weight: 700;
    font-size: 3.4mm;
    padding: 1.4mm 2mm 0.6mm;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.school-card-title {
    text-align: center;
    font-weight: 700;
    font-size: 2.7mm;
    letter-spacing: 0.5mm;
    margin-bottom: 1mm;
}

.school-card-content {
    display: grid;
    grid-template-columns: 18mm 1fr 17mm;
    gap: 2mm;
    padding: 0 3mm;
    align-items: center;
}

.school-card-photo {
    width: 18mm;
    height: 24mm;
    border: 0.3mm solid #555555;
    overflow: hidden;
    background: #eeeeee;
}

.school-card-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5mm;
    font-weight: 700;
}

.school-card-info {
    min-width: 0;
    font-size: 2.5mm;
    line-height: 1.38;
}

.school-card-info div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.school-card-info span {
    font-weight: 400;
}

.school-card-info strong {
    font-weight: 700;
}

.school-card-qr {
    text-align: center;
    overflow: hidden;
}

.school-card-qr img {
    width: 16mm;
    height: 16mm;
    display: block;
    margin: 0 auto 0.5mm;
}

.school-card-qr small {
    display: block;
    font-size: 1.5mm;
    line-height: 1.1;
    word-break: break-all;
}

.school-card-footer {
    position: absolute;
    left: 3mm;
    right: 3mm;
    bottom: 1.5mm;
    border-top: 0.2mm solid #cccccc;
    padding-top: 0.8mm;
    display: flex;
    justify-content: space-between;
    font-size: 2mm;
}

@media print {

    @page {
        size: 85.6mm 54mm;
        margin: 0;
    }

    body {
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    body > header,
    body > footer,
    .no-print {
        display: none !important;
    }

    .school-card-print-area {
        margin: 0;
        padding: 0;
        display: block;
    }

    .school-card {
        width: 85.6mm;
        height: 54mm;
        margin: 0;
        border-radius: 0;
        page-break-after: avoid;
    }
}

