/* ============================================================
   SUIVI DE STAGE BTS SIO – Feuille de styles principale
   ============================================================ */

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

:root {
    --accent:      #2E75B6;
    --accent-dark: #1F3864;
    --green:       #375623;
    --green-light: #E2EFDA;
    --yellow:      #FFFBCC;
    --yellow-border:#D4C400;
    --gray-light:  #F5F5F5;
    --gray:        #D9D9D9;
    --text:        #222;
    --radius:      6px;
    --shadow:      0 2px 8px rgba(0,0,0,.12);
}

body { font-family: Arial, sans-serif; font-size: 14px; color: var(--text); background: #EAECF0; }

/* ── TOPBAR ─────────────────────────────────────── */
.topbar { background: var(--accent-dark); color: #fff; padding: 0 20px; }
.topbar-inner { max-width: 1100px; margin: auto; display: flex; align-items: center;
                justify-content: space-between; min-height: 56px; }
.topbar-title strong { display: block; font-size: 15px; }
.topbar-title span   { font-size: 12px; opacity: .75; }
.topbar-user { display: flex; align-items: center; gap: 12px; font-size: 13px; }

/* ── CONTAINER ──────────────────────────────────── */
.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }

/* ── CARDS ───────────────────────────────────────── */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
        padding: 24px; margin-bottom: 24px; }
.card-title { font-size: 16px; font-weight: bold; color: var(--accent-dark);
              border-left: 4px solid var(--accent); padding-left: 10px; margin-bottom: 18px; }

/* ── SECTION HEADERS ────────────────────────────── */
.section-hdr { background: var(--accent); color: #fff; padding: 8px 14px;
               border-radius: var(--radius) var(--radius) 0 0; font-weight: bold; font-size: 14px; }
.section-hdr.green { background: var(--green); }
.section-body { border: 1px solid var(--gray); border-top: none;
                border-radius: 0 0 var(--radius) var(--radius); padding: 16px; margin-bottom: 20px; }

/* ── FORMULAIRES ────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-weight: bold; font-size: 13px; color: #444; }
.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px 10px; border: 1px solid #bbb; border-radius: var(--radius);
    font-size: 13px; font-family: Arial, sans-serif; width: 100%;
    transition: border-color .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(46,117,182,.15); }

/* zones étudiant = fond jaune clair */
.zone-etudiant input,
.zone-etudiant select,
.zone-etudiant textarea { background: var(--yellow); border-color: var(--yellow-border); }

/* zones pédago = fond vert clair */
.zone-pedago input,
.zone-pedago select,
.zone-pedago textarea { background: var(--green-light); border-color: #92C47A; }

/* ── TABLEAU HEBDO ──────────────────────────────── */
.table-hebdo { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-hebdo th { background: var(--accent); color: #fff; padding: 9px 10px;
                  text-align: left; font-weight: bold; }
.table-hebdo th.green { background: var(--green); }
.table-hebdo td { padding: 6px 8px; vertical-align: top; border-bottom: 1px solid var(--gray); }
.table-hebdo tr:nth-child(even) td { background: var(--gray-light); }
.table-hebdo textarea { width: 100%; min-height: 60px; border: 1px solid #ccc;
                         border-radius: 4px; padding: 5px; font-size: 12px; resize: vertical; }
.table-hebdo .semaine-label { font-weight: bold; white-space: nowrap; color: var(--accent-dark); }

/* ── GRILLE COMPÉTENCES ─────────────────────────── */
.table-comp { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-comp th { background: var(--green); color: #fff; padding: 9px 10px; text-align: center; }
.table-comp th:first-child { text-align: left; }
.table-comp td { padding: 9px 10px; border-bottom: 1px solid var(--gray); }
.table-comp tr:nth-child(even) td { background: var(--gray-light); }
.table-comp .radio-group { display: flex; justify-content: center; gap: 6px; }
.table-comp input[type=radio] { width: 18px; height: 18px; accent-color: var(--green); cursor: pointer; }

/* niveau labels */
.lvl-0 { color: #C00; font-weight: bold; }
.lvl-1 { color: #D46000; font-weight: bold; }
.lvl-2 { color: #2E7D32; font-weight: bold; }
.lvl-3 { color: #1B5E20; font-weight: bold; }

/* ── RÉCAPITULATIF TABLE ────────────────────────── */
.table-recap { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-recap th { background: var(--accent-dark); color: #fff; padding: 9px 10px; text-align: left; }
.table-recap td { padding: 8px 10px; border-bottom: 1px solid var(--gray); vertical-align: middle; }
.table-recap tr:hover td { background: #EEF4FB; }
.table-recap .badge { display: inline-block; padding: 2px 8px; border-radius: 10px;
                      font-size: 11px; font-weight: bold; white-space: nowrap; }
.badge-ok   { background: #C6EFCE; color: #276221; }
.badge-wait { background: #FFEB9C; color: #9C6500; }
.badge-no   { background: #FFC7CE; color: #9C0006; }

/* ── BOUTONS ────────────────────────────────────── */
.btn { display: inline-block; padding: 9px 20px; border: none; border-radius: var(--radius);
       cursor: pointer; font-size: 13px; font-weight: bold; text-decoration: none;
       transition: opacity .15s, transform .1s; }
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary  { background: var(--accent); color: #fff; }
.btn-success  { background: var(--green); color: #fff; }
.btn-danger   { background: #C0392B; color: #fff; }
.btn-outline  { background: transparent; border: 1px solid currentColor; color: #fff; }
.btn-sm       { padding: 5px 12px; font-size: 12px; }
.btn-print    { background: #555; color: #fff; }

/* ── ALERTES ────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px;
         font-size: 13px; font-weight: bold; }
.alert-success { background: #C6EFCE; color: #276221; border-left: 4px solid #276221; }
.alert-error   { background: #FFC7CE; color: #9C0006; border-left: 4px solid #9C0006; }
.alert-info    { background: #BDD7EE; color: #1F3864; border-left: 4px solid #1F3864; }

/* ── LOGIN PAGE ─────────────────────────────────── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
              background: linear-gradient(135deg, #1F3864 0%, #2E75B6 100%); }
.login-card { background: #fff; border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,.2);
              padding: 40px 36px; width: 100%; max-width: 400px; }
.login-logo  { text-align: center; margin-bottom: 24px; }
.login-logo h1 { font-size: 18px; color: var(--accent-dark); margin-bottom: 4px; }
.login-logo p  { font-size: 12px; color: #777; }

/* ── STATS CARDS ────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card  { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
              padding: 18px; text-align: center; border-top: 4px solid var(--accent); }
.stat-card .stat-number { font-size: 32px; font-weight: bold; color: var(--accent); }
.stat-card .stat-label  { font-size: 12px; color: #777; margin-top: 4px; }

/* ── LÉGENDE ────────────────────────────────────── */
.legend { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; font-size: 12px; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot  { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }

/* ── IMPRESSION ─────────────────────────────────── */
@media print {
    .topbar, .btn, .footer, .no-print { display: none !important; }
    body { background: white; }
    .card { box-shadow: none; border: 1px solid #ccc; }
    .container { max-width: 100%; }
}

/* ── FOOTER ─────────────────────────────────────── */
.footer { text-align: center; padding: 20px; color: #888; font-size: 12px; }

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 680px) {
    .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .topbar-user span { display: none; }
}
