/* ============================================
   STYLES RÉANIMATION CHIRURGICALE GASTON CORDIER
   Styles communs pour tout le site
   ============================================ */

/* Reset de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

/* ============================================
   HEADER AVEC IMAGE
   ============================================ */

.header-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.9), rgba(0, 123, 255, 0.9)),
                url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 200"%3E%3Cpath fill="%23ffffff" fill-opacity="0.1" d="M0,160 C200,180 400,140 600,160 C800,180 1000,140 1200,160 L1200,200 L0,200 Z"/%3E%3C/svg%3E');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Overlay dégradé */
.header-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(23, 162, 184, 0.95) 0%, 
        rgba(0, 123, 255, 0.85) 50%,
        rgba(23, 162, 184, 0.95) 100%);
}

/* Icônes décoratives */
.header-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
    overflow: hidden;
}

.medical-icon {
    position: absolute;
    color: white;
    font-size: 80px;
}

.icon-brain {
    top: 20%;
    left: 15%;
}

.icon-heart {
    top: 60%;
    right: 20%;
}

.icon-lungs {
    bottom: 15%;
    left: 25%;
}

/* Contenu du header */
.header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 20px;
}

.header-content h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-content .subtitle {
    font-size: 14px;
    opacity: 0.95;
    font-weight: 300;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 18px;
    font-weight: 600;
    color: #17a2b8;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-user span {
    color: #6c757d;
    font-size: 14px;
}

.btn-logout {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #c82333;
}

/* ============================================
   SECTION TITRE PRINCIPALE
   ============================================ */

.main-title-section {
    background: white;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-title-section h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.main-title-section p {
    color: #6c757d;
    font-size: 15px;
}

/* ============================================
   CONTAINERS
   ============================================ */

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.container-small {
    max-width: 500px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ============================================
   BOÎTES DE CONTENU
   ============================================ */

.content-box {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.content-box h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
}

.content-box h3 {
    color: #17a2b8;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 18px;
}

.content-box p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 15px;
}

.content-box ul {
    color: #6c757d;
    line-height: 1.8;
    margin-left: 20px;
}

.content-box ul li {
    margin-bottom: 8px;
}

/* ============================================
   FORMULAIRES
   ============================================ */

.login-box,
.form-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.login-header,
.form-header {
    background: linear-gradient(135deg, #17a2b8 0%, #007bff 100%);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

.login-header h3,
.form-header h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 5px;
}

.login-header p,
.form-header p {
    font-size: 14px;
    opacity: 0.9;
}

.login-form,
.form-content {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #17a2b8;
    background: white;
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1);
}

.checkbox-group {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #17a2b8;
}

.checkbox-group label {
    color: #6c757d;
    font-size: 14px;
    cursor: pointer;
    margin: 0;
}

/* ============================================
   BOUTONS
   ============================================ */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #17a2b8 0%, #007bff 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(23, 162, 184, 0.4);
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

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

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.alert-error {
    background: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

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

.login-footer,
.form-footer {
    padding: 20px 30px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.login-footer a,
.form-footer a {
    color: #17a2b8;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.login-footer a:hover,
.form-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   GRILLE D'OUTILS
   ============================================ */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.tool-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #17a2b8 0%, #007bff 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
    color: white;
}

.tool-card h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.tool-card p {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
}

.tool-card.locked {
    opacity: 0.6;
}

.tool-card.locked .tool-icon {
    background: #dc3545;
}

/* ============================================
   TABLEAUX
   ============================================ */

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

/* ============================================
   UTILITAIRES
   ============================================ */

.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

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

@media (max-width: 768px) {
    .header-image {
        height: 150px;
    }

    .header-content h1 {
        font-size: 24px;
    }

    .main-title-section h2 {
        font-size: 24px;
    }

    .navbar-container {
        flex-direction: column;
        gap: 15px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .login-form,
    .form-content {
        padding: 20px;
    }

    .container {
        margin: 20px auto;
    }
}

@media (max-width: 480px) {
    .container-small {
        margin: 20px auto;
    }

    .header-content h1 {
        font-size: 20px;
    }

    .main-title-section h2 {
        font-size: 20px;
    }

    .content-box {
        padding: 20px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* ============================================
   ACCESSIBILITÉ
   ============================================ */

a:focus,
button:focus,
input:focus {
    outline: 2px solid #17a2b8;
    outline-offset: 2px;
}

/* Respecter la préférence de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
