/* ========================================
   MEDICAL APP - Global Styles
   ======================================== */

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0B60A3;
    --primary-dark: #094f86;
    --primary-light: #cedfed;
    --secondary: #60981F;
    --secondary-dark: #487217;
    --secondary-light: #dfead2;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #0B60A3;
    --info-light: #cedfed;
    --success: #60981F;
    --success-light: #dfead2;
    --dark: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
}

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

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: none;
    margin: 0 auto;
    padding: 0 1.5rem;
}


.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.navbar-brand .logo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
}

img.logo-icon {
    object-fit: cover;
}

.feature-list-sm {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    text-align: left;
}

.feature-list-sm li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.feature-list-sm li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.testimonial-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.testimonial-stars {
    color: #f59e0b;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    letter-spacing: 2px;
}

.testimonial-text {
    font-style: italic;
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.testimonial-author strong {
    display: block;
    font-size: 0.9rem;
}

.testimonial-author span {
    font-size: 0.8rem;
    color: var(--gray-400);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.navbar-nav a {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    color: var(--gray-600);
    transition: var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
    background: var(--primary-light);
    color: var(--primary);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-700);
}

/* Sur ordinateur, .navbar-collapse n'est qu'un conteneur en ligne (liens +
   boutons alignes a droite). Il ne devient un tiroir lateral qu'en dessous de
   768 px (voir la media query correspondante). */
.navbar-collapse {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.mobile-close {
    display: none;
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 999;
}

.mobile-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.no-scroll {
    overflow: hidden;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    line-height: 1.5;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    margin: 5px 0;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

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

.btn-warning {
    background: var(--warning);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
}

.btn-ghost:hover {
    background: var(--gray-100);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* ========================================
   CONTAINER & LAYOUT
   ======================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

.section-sm {
    padding: 2rem 0;
}

.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.9;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2,
.card-header h3 {
    font-size: 1.125rem;
    color: var(--gray-800);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    transition: var(--transition);
    background: var(--white);
    color: var(--gray-800);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

select.form-control:disabled {
    background-color: var(--gray-100);
    color: var(--gray-500);
    cursor: not-allowed;
}

/* Selecteur d'icones (formulaire article de blog) */
.icon-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.625rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
}

.icon-picker .icon-choice {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    line-height: 1;
    padding: 0;
    background: var(--gray-100);
    border: 1.5px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.icon-picker .icon-choice:hover {
    border-color: var(--gray-300);
    background: var(--gray-200);
}

.icon-picker .icon-choice.active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--primary);
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* ========================================
   TABLES
   ======================================== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.table th,
.table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   BADGES & TAGS
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background: var(--success-light);
    color: var(--secondary);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--accent-dark);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

.badge-gray {
    background: var(--gray-200);
    color: var(--gray-600);
}

/* ========================================
   DASHBOARD LAYOUT
   ======================================== */
.dashboard {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--gray-900);
    color: var(--white);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--gray-700);
    margin-bottom: 1rem;
}

.sidebar-brand h2 {
    font-size: 1.25rem;
    color: var(--white);
}

.sidebar-brand p {
    font-size: 0.8125rem;
    color: var(--gray-400);
    margin-top: 0.25rem;
}

.sidebar-nav {
    padding: 0 0.75rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    color: var(--gray-400);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition);
    margin-bottom: 0.25rem;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.sidebar-nav a.active {
    background: var(--primary);
    color: var(--white);
}

.sidebar-nav a .icon {
    width: 1.25rem;
    text-align: center;
    font-size: 1rem;
}

.sidebar-section {
    padding: 0.75rem 1rem 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    font-weight: 600;
}

.main-content {
    padding: 2rem;
    background: var(--gray-50);
    overflow-y: auto;
}

.dashboard-mobile-bar {
    display: none;
}

/* ========================================
   STAT CARDS
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-card .stat-icon.blue {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-card .stat-icon.green {
    background: var(--secondary-light);
    color: var(--secondary);
}

.stat-card .stat-icon.yellow {
    background: var(--warning-light);
    color: var(--accent-dark);
}

.stat-card .stat-icon.red {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-card .stat-icon.purple {
    background: #ede9fe;
    color: #7c3aed;
}

.stat-card .stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.stat-card .stat-info p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.125rem;
}

/* ========================================
   MODALS
   ======================================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
    padding: 0.25rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    /* background: linear-gradient(135deg, var(--primary) 0%, #1e40af 50%, var(--primary-dark) 100%); */
    background-image: url('../assets/imagesite2.jpg');
    color: var(--white);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
    height: 800px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero .btn-white {
    background: var(--white);
    color: var(--primary);
    font-weight: 700;
}

.hero .btn-white:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hero .btn-outline-white {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: var(--white);
}

.hero .btn-outline-white:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-visual .hero-card {
    background: rgba(128, 128, 128, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
}

.hero-visual .hero-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.hero-visual .feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hero-visual .feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
}

.hero-visual .feature-list li .check {
    width: 24px;
    height: 24px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* ========================================
   FEATURES / SERVICES GRID
   ======================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-card .feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.25rem;
    background: var(--primary-light);
    color: var(--primary);
}

.feature-card.featured {
    border-color: var(--primary);
    position: relative;
}

.feature-card.featured::before {
  content: 'Populaire';
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--primary);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 1;
}

.feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--gray-800);
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.9375rem;
    line-height: 1.6;
    text-align: start !important;
}

/* ========================================
   SUBSCRIPTION PLANS
   ======================================== */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.plan-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 2px solid transparent;
    min-height: 700px;
}

.plan-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.plan-card.featured {
    border-color: var(--primary);
    position: relative;
}

.plan-card.featured::before {
    content: 'Populaire';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

.plan-card .plan-header {
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.plan-card .plan-header .plan-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.plan-card .plan-header h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.plan-card .plan-header .price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.plan-card .plan-header .price span {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--gray-500);
}

.plan-card .plan-body {
    padding: 1.5rem;
}

.plan-card .plan-body ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.plan-card .plan-body ul li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.plan-card .plan-body ul li .icon {
    color: var(--success);
    margin-top: 0.125rem;
    flex-shrink: 0;
}

/* ========================================
   APPOINTMENTS / RENDEZ-VOUS
   ======================================== */
.appointment-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
}

.appointment-card.cancelled {
    border-left-color: var(--danger);
    opacity: 0.7;
}

.appointment-card.completed {
    border-left-color: var(--success);
}

.appointment-card.pending {
    border-left-color: var(--warning);
}

.appointment-date {
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius);
    padding: 0.75rem;
    text-align: center;
    min-width: 60px;
}

.appointment-date .day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.appointment-date .month {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
}

.appointment-info {
    flex: 1;
}

.appointment-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.appointment-info p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.appointment-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ========================================
   PATIENT FILE / DOSSIER
   ======================================== */
.patient-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.patient-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.patient-info h2 {
    font-size: 1.5rem;
}

.patient-info p {
    color: var(--gray-500);
}

.patient-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.patient-tabs button {
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.patient-tabs button:hover {
    color: var(--gray-700);
}

.patient-tabs button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ========================================
   TIMELINE
   ======================================== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.375rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--white);
    box-shadow: var(--shadow);
}

.timeline-item.completed::before {
    background: var(--success);
}

.timeline-item .timeline-date {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.timeline-item .timeline-content {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.timeline-item .timeline-content h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.timeline-item .timeline-content p {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ========================================
   SEARCH & FILTERS
   ======================================== */
.search-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-bar .search-input {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-bar .search-input input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.search-bar .search-input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-bar .search-input .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-chip {
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--gray-300);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.filter-chip:hover,
.filter-chip.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-info {
    background: var(--info-light);
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ========================================
   TABS
   ======================================== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--gray-700);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--gray-300);
    background: var(--white);
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.pagination button:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.pagination button.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .pg-gap {
    color: var(--gray-400);
    padding: 0 0.25rem;
    user-select: none;
}

/* ========================================
   LOGIN PAGE
   ======================================== */
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.login-visual {
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.login-visual::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: -20%;
    right: -20%;
}

.login-visual .content {
    position: relative;
    z-index: 1;
    max-width: 400px;
}

.login-visual h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.login-visual p {
    font-size: 1.125rem;
    opacity: 0.9;
    line-height: 1.7;
}

.login-form-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.login-form-wrapper h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.login-form-wrapper .subtitle {
    color: var(--gray-500);
    margin-bottom: 2rem;
}

.login-form-wrapper .divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: var(--gray-400);
    font-size: 0.875rem;
}

.login-form-wrapper .divider::before,
.login-form-wrapper .divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 1.5rem);
    height: 1px;
    background: var(--gray-300);
}

.login-form-wrapper .divider::before {
    left: 0;
}

.login-form-wrapper .divider::after {
    right: 0;
}

/* ========================================
   BLOG / ARTICLES
   ======================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    max-width: 500px;
}

.blog-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.blog-card .blog-image {
    height: 200px;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--gray-400);
    overflow: hidden;
}

.blog-card .blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-card .blog-content {
    padding: 1.25rem;
}

.blog-card .blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.blog-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-card p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   CONTACT / FOOTER
   ======================================== */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer p {
    line-height: 1.7;
    font-size: 0.9375rem;
}

.footer a {
    display: block;
    padding: 0.25rem 0;
    font-size: 0.9375rem;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--white);
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: var(--white);
}

/* ========================================
   STATUS INDICATORS
   ======================================== */
.status-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online::before {
    background: var(--success);
}

.status-dot.offline::before {
    background: var(--gray-400);
}

.status-dot.busy::before {
    background: var(--danger);
}

.status-dot.away::before {
    background: var(--warning);
}

/* ========================================
   PROGRESS BARS
   ======================================== */
.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar .progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease;
}

.progress-bar .progress-fill.blue {
    background: var(--primary);
}

.progress-bar .progress-fill.green {
    background: var(--success);
}

.progress-bar .progress-fill.yellow {
    background: var(--warning);
}

.progress-bar .progress-fill.red {
    background: var(--danger);
}

/* ========================================
   RATING STARS
   ======================================== */
.rating {
    display: flex;
    gap: 0.25rem;
}

.rating .star {
    font-size: 1.25rem;
    color: var(--gray-300);
    cursor: pointer;
    transition: var(--transition);
}

.rating .star.filled {
    color: var(--accent);
}

.rating .star:hover {
    color: var(--accent);
}

/* ========================================
   NOTIFICATION DROPDOWN
   ======================================== */
.notification-wrapper {
    position: relative;
}

.notification-bell {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    position: relative;
    color: var(--gray-600);
    padding: 0.5rem;
}

.notification-bell .badge-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: var(--white);
    font-size: 0.6875rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
}

.notification-dropdown.active {
    display: block;
}

.notification-dropdown .notif-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-dropdown .notif-item {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    gap: 0.75rem;
    transition: var(--transition);
}

.notification-dropdown .notif-item:hover {
    background: var(--gray-50);
}

.notification-dropdown .notif-item.unread {
    background: var(--primary-light);
}

.notification-dropdown .notif-item .notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.875rem;
}

.notification-dropdown .notif-item .notif-text {
    flex: 1;
}

.notification-dropdown .notif-item .notif-text p {
    font-size: 0.875rem;
    line-height: 1.4;
}

.notification-dropdown .notif-item .notif-text .time {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* ========================================
   NOTIFICATIONS - SECTION / LISTE COMPLETE
   ======================================== */
.sidebar-nav a .notif-sidebar-badge {
    display: inline-block;
    margin-left: auto;
    min-width: 20px;
    text-align: center;
    font-size: 0.6875rem;
    padding: 0.125rem 0.375rem;
}

.notif-list-item {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    align-items: flex-start;
}

.notif-list-item:hover {
    background: var(--gray-50);
}

.notif-list-item.unread {
    background: var(--primary-light);
    border-left: 3px solid var(--accent);
}

.notif-list-item .notif-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.9375rem;
}

.notif-list-item .notif-main {
    flex: 1;
}

.notif-list-item .notif-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.notif-list-item .notif-msg {
    font-size: 0.8125rem;
    color: var(--gray-600);
    line-height: 1.45;
    margin-top: 0.15rem;
}

.notif-list-item .notif-time {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.notif-empty {
    text-align: center;
    color: var(--gray-500);
    padding: 2.25rem 1rem;
    font-size: 0.875rem;
}

/* ========================================
   MAP / GPS
   ======================================== */
.map-container {
    width: 100%;
    height: 350px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--gray-300);
}

.map-placeholder {
    text-align: center;
    color: var(--gray-500);
}

.map-placeholder .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ========================================
   CONTACT CARDS
   ======================================== */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

.contact-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.contact-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.contact-card .contact-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.contact-card h4 {
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
        position: fixed;
        left: 0;
        top: 0;
        width: 260px;
        z-index: 1100;
    }

    .sidebar.open {
        display: block;
        box-shadow: 0 10px 40px rgba(15, 23, 42, 0.35);
    }

    .sidebar-brand {
        padding-right: 3.5rem;
    }

    .sidebar .mobile-close {
        display: inline-flex;
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 38px;
        height: 38px;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.12);
        border: none;
        border-radius: 8px;
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
        color: var(--white);
    }

    .dashboard-mobile-bar {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        position: sticky;
        top: 0;
        z-index: 900;
        margin: -1rem -1rem 1rem;
        padding: 0.75rem 1rem;
        background: var(--white);
        border-bottom: 1px solid var(--gray-200);
    }

    .dashboard-mobile-bar .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: 10px;
        font-size: 1.4rem;
        line-height: 1;
        cursor: pointer;
        color: var(--gray-700);
    }

    .dashboard-mobile-title {
        font-size: 1rem;
        font-weight: 600;
        color: var(--gray-900);
    }

    .main-content {
        padding: 1rem;
    }

    .hero {
        height: auto;
        min-height: 800px;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .feature-list{
        text-align:start;
    }

    .hero-actions {
        justify-content: center;
    }

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

@media (max-width: 768px) {
    /* Menu mobile : tiroir lateral glissant depuis la droite. */
    .navbar-collapse {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        height: 100dvh;
        width: min(82vw, 320px);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 4.5rem 1.25rem 2rem;
        background: var(--white);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.14);
        transform: translateX(105%);
        transition: transform 0.28s ease;
        z-index: 1200;
        overflow-y: auto;
    }

    .navbar-collapse.open {
        transform: translateX(0);
    }

    .navbar-nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.15rem;
    }

    .navbar-nav a {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }

    .navbar-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--gray-100);
    }

    .navbar-actions .btn {
        width: 100%;
    }

    .mobile-close {
        display: inline-flex;
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        background: var(--gray-100);
        border: none;
        border-radius: 8px;
        font-size: 1.5rem;
        line-height: 1;
        cursor: pointer;
        color: var(--gray-700);
    }

    .mobile-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .login-page {
        grid-template-columns: 1fr;
    }

    .login-visual {
        display: none;
    }

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

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

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .section {
        padding: 2.5rem 0;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.slide-up {
    animation: slideUp 0.5s ease;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {

    .sidebar,
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }

    .main-content {
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ========================================
   UTILITIES
   ======================================== */
.text-center {
    text-align: center;
}

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

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-gray {
    color: var(--gray-500);
}

.fw-bold {
    font-weight: 700;
}

.fw-semibold {
    font-weight: 600;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.d-flex {
    display: flex;
}

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

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.w-100 {
    width: 100%;
}

.hidden {
    display: none;
}

/* ========================================
   ROUTER
   ======================================== */
.dashboard-mode .navbar,
.dashboard-mode .footer {
    display: none;
}

.route-loading {
    padding: 3rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.route-loading::before {
    content: '';
    display: inline-block;
    width: 26px;
    height: 26px;
    border: 3px solid var(--gray-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin-right: 0.75rem;
    vertical-align: middle;
    animation: routerSpin 0.8s linear infinite;
}

@keyframes routerSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   EDITEUR RICH TEXT (contenu des articles)
   ======================================== */
.rtx {
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    overflow: hidden;
}

.rtx:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.rtx-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
    padding: 0.4rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-100);
}

.rtx-btn {
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.rtx-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.rtx-btn.active,
.rtx-btn:active {
    background: rgba(37, 99, 235, 0.12);
    border-color: var(--primary);
    color: var(--primary);
}

.rtx-btn-code {
    margin-left: auto;
    font-size: 0.75rem;
}

.rtx-sep {
    width: 1px;
    height: 1.25rem;
    margin: 0 0.25rem;
    background: var(--gray-300);
}

.rtx-editor,
.rtx-source {
    display: block;
    width: 100%;
    min-height: 220px;
    max-height: 520px;
    overflow-y: auto;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--gray-800);
    background: var(--white);
    border: 0;
    resize: vertical;
    font-family: inherit;
}

.rtx-source {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.rtx-editor:focus,
.rtx-source:focus {
    outline: none;
}

.rtx-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--gray-400);
}

.rtx-editor h2 {
    font-size: 1.375rem;
    margin: 1.1rem 0 0.5rem;
}

.rtx-editor h3 {
    font-size: 1.125rem;
    margin: 1rem 0 0.4rem;
}

.rtx-editor p {
    margin: 0 0 0.75rem;
}

.rtx-editor ul,
.rtx-editor ol {
    margin: 0 0 0.75rem 1.25rem;
}

.rtx-editor blockquote {
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.9rem;
    border-left: 3px solid var(--primary);
    background: var(--gray-100);
    color: var(--gray-600);
}

.rtx-editor img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.rtx-editor a {
    color: var(--primary);
}


/* ========================================
   PAGE ARTICLE (lecture d'un article de blog)
   ======================================== */
.article-page {
    padding: 1.5rem 0 4rem;
    background:
        radial-gradient(1100px 320px at 50% -80px, var(--primary-light) 0%, transparent 70%),
        linear-gradient(180deg, var(--gray-50) 0%, var(--gray-50) 60%, var(--white) 100%);
    min-height: 60vh;
}

.article-container {
    max-width: 860px;
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.article-back:hover {
    color: var(--primary);
    border-color: var(--primary-light);
    transform: translateX(-2px);
}

.article-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* ---------- En-tete : banniere ou pastille ---------- */
.article-hero {
    padding: 2.5rem 2rem 1.75rem;
    text-align: center;
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
    border-bottom: 1px solid var(--gray-100);
}

.article-icon {
    width: 108px;
    height: 108px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.25rem;
    line-height: 1;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

/* Image de couverture : banniere recadree, jamais deformer */
.article-icon.article-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 21 / 9;
    border: 0;
    border-radius: 0;
    background: var(--gray-100);
    box-shadow: none;
    overflow: hidden;
}

.article-icon.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ---------- Metadonnees ---------- */
.article-content {
    padding: 2rem 2.5rem 2.5rem;
}

.article-meta {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

.article-meta-item {
    white-space: nowrap;
}

.article-sep {
    color: var(--gray-300);
}

.article-badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 999px;
    white-space: nowrap;
}

.article-badge-nutrition {
    color: var(--secondary-dark);
    background: var(--secondary-light);
}

.article-badge-social {
    color: #7c3aed;
    background: #ede9fe;
}

.article-badge-actualites {
    color: var(--accent-dark);
    background: #fef3c7;
}

/* ---------- Titre ---------- */
.article-title {
    max-width: 24ch;
    margin: 0 auto 1.25rem;
    font-size: clamp(1.75rem, 4.2vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--gray-900);
    text-align: center;
    text-wrap: balance;
}

/* ---------- Chapeau ---------- */
.article-excerpt {
    max-width: 62ch;
    margin: 0 auto 2.25rem;
    padding: 1rem 0;
    font-size: 1.0625rem;
    line-height: 1.7;
    font-style: italic;
    color: var(--gray-600);
    text-align: center;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.article-excerpt:empty {
    display: none;
}

/* ========================================
   CORPS DE L'ARTICLE (HTML issu de l'editeur)
   ======================================== */
.article-body {
    max-width: 68ch;
    margin: 0 auto;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--gray-700);
    overflow-wrap: break-word;
}

.article-body>*:last-child {
    margin-bottom: 0;
}

.article-body>p:first-of-type {
    font-size: 1.125rem;
    color: var(--gray-800);
}

.article-body h2,
.article-body h3,
.article-body h4 {
    color: var(--gray-900);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.article-body h2 {
    margin: 2.25rem 0 0.75rem;
    padding-left: 0.85rem;
    font-size: 1.5rem;
    border-left: 4px solid var(--primary);
}

.article-body h3 {
    margin: 1.75rem 0 0.6rem;
    font-size: 1.25rem;
}

.article-body h4 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.0625rem;
}

.article-body p {
    margin: 0 0 1.1rem;
}

.article-body ul,
.article-body ol {
    margin: 0 0 1.1rem 1.35rem;
    padding: 0;
}

.article-body li {
    margin-bottom: 0.45rem;
}

.article-body ul li::marker {
    color: var(--primary);
}

.article-body ol li::marker {
    color: var(--primary);
    font-weight: 600;
}

.article-body a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: var(--transition);
}

.article-body a:hover {
    color: var(--primary-dark);
    text-decoration-thickness: 2px;
}

.article-body blockquote {
    position: relative;
    margin: 1.75rem 0;
    padding: 1.1rem 1.35rem;
    font-style: italic;
    color: var(--gray-600);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--secondary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

/* Images : cadre propre, jamais de deformation ni de debordement */
.article-body img,
.article-body figure img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.75rem auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    background: var(--gray-100);
}

.article-body figure {
    margin: 1.75rem 0;
}

.article-body figure img {
    margin: 0 auto;
}

.article-body figcaption {
    margin-top: 0.6rem;
    font-size: 0.875rem;
    font-style: italic;
    color: var(--gray-500);
    text-align: center;
}

.article-body hr {
    width: 130px;
    margin: 2.75rem auto;
    border: 0;
    border-top: 2px solid var(--gray-200);
}

.article-body code {
    padding: 0.15rem 0.35rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    color: var(--primary-dark);
    background: var(--gray-100);
    border-radius: 5px;
}

.article-body pre {
    margin: 0 0 1.25rem;
    padding: 1rem 1.15rem;
    background: var(--gray-900);
    color: #e2e8f0;
    border-radius: var(--radius-md);
    overflow-x: auto;
    line-height: 1.6;
}

.article-body pre code {
    padding: 0;
    color: inherit;
    background: none;
    font-size: 0.875rem;
}

.article-body strong {
    color: var(--gray-900);
}

/* ---------- Pied de l'article ---------- */
.article-footer {
    max-width: 68ch;
    margin: 3rem auto 0;
    padding-top: 2rem;
    text-align: center;
    border-top: 1px solid var(--gray-200);
}

.article-footer-rule {
    display: block;
    width: 56px;
    height: 4px;
    margin: -2.75rem auto 1.75rem;
    background: var(--primary);
    border-radius: 999px;
}

/* ---------- Barre de progression de lecture ---------- */
.read-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1200;
    background: transparent;
    pointer-events: none;
}

.read-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.1s linear;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .article-page {
        padding-top: 1rem;
    }

    .article-hero {
        padding: 1.75rem 1.25rem 1.25rem;
    }

    .article-icon {
        width: 84px;
        height: 84px;
        font-size: 2.5rem;
    }

    .article-icon.article-cover {
        aspect-ratio: 16 / 9;
    }

    .article-content {
        padding: 1.5rem 1.15rem 1.75rem;
    }

    .article-title {
        margin-bottom: 1rem;
    }

    .article-excerpt {
        margin-bottom: 1.75rem;
        font-size: 1rem;
    }

    .article-body {
        font-size: 1rem;
        line-height: 1.75;
    }

    .article-body h2 {
        font-size: 1.3rem;
    }

    .article-body>p:first-of-type {
        font-size: 1.0625rem;
    }
}

/* ---------- Captcha arithmetique ---------- */
.captcha-box {
    display: block;
    padding: 0.75rem 1rem;
    border: 1px dashed var(--gray-300);
    border-radius: 8px;
    background: var(--gray-50);
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.captcha-label {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--gray-800);
    flex: 1 1 auto;
}

.captcha-input {
    width: 80px;
    text-align: center;
    font-weight: 600;
}

.captcha-loading {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.captcha-error {
    color: var(--danger);
    font-size: 0.875rem;
}
/* ========================================
   FICHE PRODUIT (boutique)
   Colonnes : visuel a gauche, informations a
   droite. Sous 880px la fiche passe en une
   seule colonne, l'image au-dessus.
   ======================================== */
.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}

.product-media {
    position: sticky;
    top: 1.5rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.product-media img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* Sans image : pastille couleur primaire */
.product-media-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    font-size: 4rem;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.product-title {
    margin: 0.75rem 0 0;
    font-size: clamp(1.6rem, 3.4vw, 2.25rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--gray-900);
    text-wrap: balance;
}

.product-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--primary);
}

.product-price-note {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--gray-500);
}

.product-summary {
    margin: 1rem 0 0;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--gray-700);
}

/* Bloc achat : colle a l'information, reste visible */
.product-buy {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.product-buy .btn-primary {
    font-size: 1rem;
    padding: 0.8rem 1.75rem;
}

.product-stock {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
}

/* Sections du contenu long (products.metadata.content) */
.product-section {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--gray-100);
}

.product-section-title {
    margin: 0 0 1rem;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--gray-900);
}

/* Sommaire (liste) ou infos supplementaires produit */
.product-list {
    margin: 0;
    padding-left: 1.15rem;
    font-size: 0.9688rem;
    line-height: 1.75;
    color: var(--gray-700);
}

.product-list li+li {
    margin-top: 0.35rem;
}

.product-info-table {
    width: 100%;
    font-size: 0.9375rem;
    border-collapse: collapse;
}

.product-info-table th,
.product-info-table td {
    padding: 0.6rem 0.5rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--gray-100);
}

.product-info-table th {
    width: 38%;
    font-weight: 600;
    color: var(--gray-500);
}

/* Pied de fiche : autres articles */
.product-related-title {
    margin: 3.5rem 0 1.25rem;
    font-size: 1.25rem;
    color: var(--gray-900);
}

.product-related {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.25rem;
}

@media (max-width: 880px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .product-media {
        position: static;
    }
}

/* ========================================
   PUBLICITES - CARROUSEL (vitrine)
   Une publicite a la fois, bandeau pleine largeur. Présent sur les pages
   publiques via le conteneur #offres-carousel (voir loadPublicites).
   ======================================== */
.offre-carousel {
    position: relative;
    max-width: 960px;
    margin: 0 auto;
}

.offre-viewport {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.offre-track {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
}

.offre-slide {
    flex: 0 0 100%;
    min-width: 100%;
}

.offre-banner {
    display: flex;
    align-items: stretch;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    min-height: 240px;
}

.offre-slide-media {
    flex: 0 0 42%;
    background: var(--gray-100);
}

.offre-slide-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.offre-slide-body {
    flex: 1 1 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.offre-badge {
    align-self: flex-start;
    margin-bottom: 0.75rem;
}

.offre-slide-body h3 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.offre-slide-body p {
    color: var(--gray-500);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.offre-slide-cta {
    margin-top: auto;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.offre-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--gray-700);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: var(--transition);
}

.offre-nav:hover {
    background: var(--white);
    color: var(--primary);
}

.offre-prev { left: 0.75rem; }
.offre-next { right: 0.75rem; }

.offre-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.offre-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--gray-300);
    cursor: pointer;
    transition: var(--transition);
}

.offre-dot.active {
    background: var(--primary);
    transform: scale(1.15);
}

.offre-carousel:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
    border-radius: var(--radius-lg);
}

@media (max-width: 700px) {
    .offre-banner {
        flex-direction: column;
        min-height: 0;
    }

    .offre-slide-media {
        flex-basis: auto;
        height: 180px;
    }

    .offre-slide-body {
        padding: 1.25rem;
    }

    .offre-nav {
        width: 38px;
        height: 38px;
    }

    .offre-prev { left: 0.4rem; }
    .offre-next { right: 0.4rem; }
}
