/* ---
   Aura - Stylesheet
   Design System: Liquid Glass
   --- */

/* 1. Variables & Global Styles
   --------------------------------- */
:root {
    /* Thème Clair (Défaut) */
    --color-background-start: #eef2f5;
    --color-background-end: #e6e9f0;
    --color-glass-bg: rgba(255, 255, 255, 0.2);
    --color-glass-border: rgba(255, 255, 255, 0.18);
    --color-accent: #007AFF;
    --color-accent-hover: #0056b3;
    --color-text-dark: #1D1D1F;
    --color-text-headings: #1D1D1F;
    --color-text-body: #333;
    --color-shadow: rgba(0, 0, 0, 0.1);
    --color-icon: var(--color-accent);
    --color-button-secondary-bg: rgba(255, 255, 255, 0.5);
    --color-button-secondary-hover-bg: #fff;
    --color-footer-text: #666;
    --portal-sidebar-bg: rgba(245, 245, 247, 0.8);
    --message-bubble-received-bg: #e5e5ea;
    
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition-speed: 0.3s;
}

body.dark-mode {
    /* Thème Sombre */
    --color-background-start: #101018;
    --color-background-end: #12121c;
    --color-glass-bg: rgba(25, 25, 30, 0.4);
    --color-glass-border: rgba(255, 255, 255, 0.1);
    --color-accent: #70D7FF;
    --color-accent-hover: #a2eaff;
    --color-text-dark: #E1E1E6;
    --color-text-headings: #FFFFFF;
    --color-text-body: #E1E1E6;
    --color-shadow: rgba(0, 0, 0, 0.2);
    --color-icon: var(--color-accent);
    --color-button-secondary-bg: rgba(255, 255, 255, 0.1);
    --color-button-secondary-hover-bg: rgba(255, 255, 255, 0.2);
    --color-footer-text: #a0a0a0;
    --portal-sidebar-bg: rgba(18, 18, 28, 0.7);
    --message-bubble-received-bg: #37373c;
}


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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-body);
    background-color: var(--color-background-start);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-speed) ease;
}

body.nav-open {
    overflow: hidden;
}

.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, var(--color-background-start), var(--color-background-end));
    background-size: 200% 200%;
    animation: gradient-animation 15s ease infinite;
    transition: background var(--transition-speed) ease;
}

body.dark-mode .background-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-image: radial-gradient(ellipse 1px 1px at 50% 50%, rgba(255,255,255,0.2) 1px, transparent 100%);
    background-size: 100px 100px;
    animation: stars-animation 60s linear infinite;
}

@keyframes stars-animation {
    from { transform: translate(0, 0); }
    to { transform: translate(-50%, -50%); }
}


@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-text-headings);
    font-weight: 700;
}

h1 {
    font-size: clamp(2.5rem, 1.96rem + 2.68vw, 3.5rem);
    line-height: 1.1;
}
h2 {
    font-size: clamp(2rem, 1.79rem + 1.07vw, 2.5rem);
    margin-bottom: 1rem;
}
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }


p { margin-bottom: 1rem; }
a { color: var(--color-accent); text-decoration: none; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 2. Reusable Components
   --------------------------------- */

.glass-card {
    background: var(--color-glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--color-glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 var(--color-shadow);
    padding: 2rem;
    transition: all var(--transition-speed) ease-in-out;
}

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

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-speed) ease-in-out;
    border: none;
    cursor: pointer;
}

.btn.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    box-shadow: 0 5px 15px rgba(0, 122, 255, 0.3);
    transform: translateY(-2px);
}

body.dark-mode .btn-primary {
    color: #1D1D1F;
}

.btn-secondary {
    background: var(--color-button-secondary-bg);
    color: var(--color-text-dark);
    border: 1px solid var(--color-glass-border);
}

.btn-secondary:hover {
    background: var(--color-button-secondary-hover-bg);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: #fff;
}

body.dark-mode .btn-outline:hover {
    color: var(--color-background-start);
}

.status { 
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600; 
}
.status.status-ok { background-color: rgba(46, 204, 113, 0.2); color: #27ae60; }
.status.status-off { background-color: rgba(231, 76, 60, 0.2); color: #c0392b; }
.status.status-maintenance { background-color: rgba(243, 156, 18, 0.2); color: #d35400; }


/* 3. Header & Navigation
   --------------------------------- */
.main-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    z-index: 100;
    padding: 1rem 2rem;
}

.main-header.glass-card:hover {
    transform: translateX(-50%);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.8rem;
    text-decoration: none;
    color: var(--color-text-dark);
}

.logo .first-letter {
    color: #007AFF;
}

body.dark-mode .logo {
    color: #FFFFFF;
}

body.dark-mode .logo .first-letter {
    color: #70D7FF;
}


.nav-desktop ul {
    display: flex;
    list-style: none;
}

.nav-desktop ul li a {
    color: var(--color-text-dark);
    padding: 10px 20px;
    font-weight: 600;
    position: relative;
    transition: color var(--transition-speed) ease-in-out;
}

.nav-desktop ul li a.active {
    color: var(--color-accent);
}

.nav-desktop ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-speed) ease-in-out;
}

.nav-desktop ul li a:hover::after,
.nav-desktop ul li a.active::after {
    width: 50%;
}

.nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-dark);
    position: relative;
}

/* 4. Page Sections */
section { padding: 6rem 0; }
.hero-section { min-height: 100vh; display: flex; align-items: center; text-align: center; padding-top: 150px; }
.hero-section h1 { max-width: 800px; margin: 0 auto 1.5rem; }
.hero-section p { font-size: 1.25rem; max-width: 600px; margin: 0 auto 2.5rem; color: var(--color-text-body); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.trust-card { text-align: center; }
.trust-card .icon { color: var(--color-icon); margin-bottom: 1rem; }
.offer-section .grid-2 { align-items: center; }
.liquid-shape { width: 100%; padding-top: 100%; border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; background: linear-gradient(45deg, var(--color-accent), #4ca9ff); animation: morph 8s ease-in-out infinite; }
@keyframes morph { 0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; } 50% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; } 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; } }
.testimonials-section h2 { text-align: center; }
.testimonial-carousel { position: relative; overflow: hidden; max-width: 800px; margin: 0 auto; }
.testimonial-slider { display: flex; transition: transform var(--transition-speed) ease-in-out; }
.testimonial-slide { flex: 0 0 100%; max-width: 100%; text-align: center; }
.testimonial-slide img { border-radius: 50%; width: 80px; height: 80px; margin-bottom: 1rem; }
.testimonial-slide blockquote { font-size: 1.1rem; font-style: italic; border: none; margin: 0 auto 1rem; max-width: 700px; }
.testimonial-slide cite { font-weight: 600; color: var(--color-text-dark); }
.carousel-nav { text-align: center; margin-top: 2rem; }
.carousel-nav button { background: none; border: 1px solid var(--color-glass-border); border-radius: 50%; width: 40px; height: 40px; margin: 0 10px; cursor: pointer; color: var(--color-text-dark); transition: all var(--transition-speed) ease-in-out; }
.carousel-nav button:hover { background: var(--color-accent); color: #fff; }
body.dark-mode .carousel-nav button:hover { color: #1D1D1F; }
.cta-section .glass-card { text-align: center; padding: 3rem; }
.cta-section h2 { font-size: 2.2rem; }
.feature-details-section .grid-2 {
    align-items: stretch;
    gap: 3rem;
}
.feature-details-section .glass-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
/* Style pour la citation du fondateur */
.bio-quote {
    color: var(--color-accent); /* Utilise le bleu de votre charte (#007AFF) */
    font-size: 1.20rem;         /* Texte plus grand */
    font-weight: 550;           /* Texte semi-gras */
    font-style: italic;         /* Style italique pour la citation */
    line-height: 1.;           /* Meilleure lisibilité */
    margin-bottom: 2rem;        /* Espace en dessous */
    padding-left: 1rem;         /* Léger décalage */
    border-left: 3px solid var(--color-accent); /* Barre verticale bleue pour le style */
}


/* 5. Footer */
.main-footer { padding: 3rem 0 1rem; text-align: center; }
.footer-content { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1.5rem; }
.footer-nav { display: flex; list-style: none; justify-content: center; flex-wrap: wrap; }
.footer-nav li a { padding: 0 15px; color: var(--color-text-body); }
.footer-bottom { border-top: 1px solid rgba(0,0,0,0.1); padding-top: 1rem; font-size: 0.9rem; color: var(--color-footer-text); }
.footer-bottom a { color: var(--color-footer-text); }
body.dark-mode .footer-bottom { border-top-color: rgba(255,255,255,0.1); }

/* 6. Animations */
.reveal-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; transition-delay: var(--delay, 0s); }
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* 7. Mobile Experience */
.nav-mobile { display: none; }
.nav-mobile-overlay { display: none; }

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

@media (max-width: 1070px) {
    section { padding: 4rem 0; }
    .main-header { padding: 0.5rem 1rem; }
    .main-header .btn-primary { display: none; }
    .nav-desktop { display: none; }
    .nav-mobile-toggle { display: block; }
    
    .grid-2, .grid-4 { grid-template-columns: 1fr; }
    .offer-section .grid-2 { gap: 2rem; }
    .offer-visual { order: -1; max-width: 300px; margin: 0 auto; }
    .footer-content { flex-direction: column; gap: 1.5rem; }
    .footer-nav { flex-direction: column; gap: 0.5rem; }
    .nav-mobile-overlay { display: flex; flex-direction: column; justify-content: center; align-items: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(238, 242, 245, 0.8); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); z-index: 200; transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1); }
    body.dark-mode .nav-mobile-overlay { background: rgba(16, 16, 24, 0.8); }
    .nav-open .nav-mobile-overlay { transform: translateX(0); }
    .nav-mobile-overlay .close-btn { position: absolute; top: 30px; right: 20px; background: none; border: none; }
    .nav-mobile-overlay ul { list-style: none; text-align: center; }
    .nav-mobile-overlay ul li a { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; color: var(--color-text-dark); padding: 1rem; display: block; }
    .nav-mobile-overlay .btn-primary { display: block; margin-top: 2rem; }
}

/* 8. STYLES POUR LA PAGE DE CONNEXION / PORTAIL
   --------------------------------- */
.page-switcher-desktop {
    position: fixed;
    top: 30px;
    right: 40px;
    z-index: 110;
    background: var(--color-button-secondary-bg);
    border: 1px solid var(--color-glass-border);
    border-radius: 50px;
    padding: 5px;
    display: flex;
}
.page-switcher-mobile { display: none; }
.page-switch-btn {
    background: none;
    border: none;
    padding: 8px 20px;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--color-text-body);
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.page-switch-btn.active {
    background-color: var(--color-accent);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 122, 255, 0.3);
}
body.dark-mode .page-switch-btn.active { color: #1D1D1F; }

.login-page-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    position: relative;
    perspective: 1200px;
    height: 600px;
}
.login-box {
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: absolute;
    opacity: 0;
    transform: translateX(200px) rotateY(-45deg);
    transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.2, 1, 0.3, 1);
    pointer-events: none;
}
.login-box:hover { transform: translateY(0); }
.login-box.is-active { opacity: 1; transform: translateX(0) rotateY(0); z-index: 2; pointer-events: auto; }
.login-box.is-exiting { opacity: 0; transform: translateX(-200px) rotateY(45deg); z-index: 1; pointer-events: none; }
.login-box h2 { font-size: 2rem; }
.form-field { margin-bottom: 1.5rem; text-align: left; }
.form-field label { display: block; margin-bottom: 0.5rem; font-weight: 600; }

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--color-glass-border);
    background: rgba(255,255,255,0.5);
    font-size: 1rem;
    color: var(--color-text-dark);
    font-family: var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-field textarea {
    resize: vertical;
    min-height: 100px;
}
body.dark-mode .form-field input,
body.dark-mode .form-field textarea,
body.dark-mode .form-field select {
    background: rgba(255,255,255,0.1);
}
.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #666;
}
body.dark-mode .form-field input::placeholder,
body.dark-mode .form-field textarea::placeholder {
    color: #a0a0a0;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

.login-box .btn { width: 100%; }
#login-error { color: #c0392b; background: rgba(192, 57, 43, 0.1); padding: 10px; border-radius: 8px; margin-bottom: 1.5rem; font-size: 0.9rem; display: none; }

@media (max-width: 768px) {
    body.login-page {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 1rem;
        min-height: 100vh;
    }

    .page-switcher-desktop { display: none; }
    .page-switcher-mobile {
        display: flex;
        z-index: 5;
        background: var(--color-button-secondary-bg);
        border: 1px solid var(--color-glass-border);
        border-radius: 50px;
        padding: 5px;
        margin-bottom: 2rem;
    }
    .login-page-container {
        padding: 0;
        width: 100%; 
        height: auto;
        min-height: 500px;
        display: block; 
    }
}

.portal-layout { display: flex; position: relative; }
.portal-sidebar { width: 280px; position: fixed; top: 0; left: 0; height: 100vh; padding: 2rem; background: var(--portal-sidebar-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-right: 1px solid var(--color-glass-border); display: flex; flex-direction: column; justify-content: space-between; z-index: 10; transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1); padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }
.portal-sidebar .logo { margin-bottom: 3rem; }
.portal-nav a { display: flex; align-items: center; padding: 1rem; color: var(--color-text-body); font-weight: 600; border-radius: 8px; margin-bottom: 0.5rem; transition: all 0.2s ease-in-out; }
.portal-nav a:hover { background: rgba(0,0,0,0.05); }
body.dark-mode .portal-nav a:hover { background: rgba(255,255,255,0.05); }
.portal-nav a.active { background: var(--color-accent); color: #fff; }
body.dark-mode .portal-nav a.active { color: #1D1D1F; }
.portal-nav a svg { margin-right: 1rem; }
.portal-user-profile .theme-switch-wrapper { padding: 1rem 0; justify-content: flex-start; }
.portal-user-profile a { display: flex; align-items: center; padding: 1rem; color: var(--color-text-body); font-weight: 600; border-radius: 8px; transition: all 0.3s ease; }
.portal-user-profile a:hover { background: rgba(192, 57, 43, 0.1); color: #c0392b; }
.portal-user-profile a svg { margin-right: 1rem; }
.portal-main { flex-grow: 1; margin-left: 280px; padding: 2rem; height: 100vh; overflow-y: auto; }
.portal-content { display: none; }
.portal-content.is-active { display: block; animation: fadeIn 0.5s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.portal-main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.portal-main-header .portal-nav-toggle { display: none; }
.portal-main-header .logo { flex-grow: 1; text-align: center; }
.portal-main-header .portal-header-user { min-width: 50px; }
.content-header { margin-bottom: 3rem; }
.content-wrapper { padding-top: 0; }
.health-status { display: flex; gap: 2rem; }
.health-card { flex: 1; text-align: center; }
.health-card h3 { font-size: 1.2rem; }

.health-card .status-indicator { 
    width: 100px; 
    height: 100px; 
    border-radius: 50%; 
    margin: 0 auto 1rem; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.health-card .status-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    margin: 0 auto 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 90%;
    text-transform: capitalize;
    word-break: break-all;
}
.status-ok { background: rgba(46, 204, 113, 0.2); border: 2px solid #2ecc71; color: #27ae60; }
.status-maintenance { background: rgba(243, 156, 18, 0.2); border: 2px solid #f39c12; color: #d35400; }
.status-danger { background: rgba(231, 76, 60, 0.2); border: 2px solid #e74c3c; color: #c0392b; }

.health-card a { text-decoration: none; color: var(--color-text-body); }
.health-card a:hover { color: var(--color-accent); }
.health-card a.status-badge {
    color: var(--color-text-body);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid var(--color-glass-border);
    background: var(--color-button-secondary-bg);
}
.health-card a.status-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
body.dark-mode .health-card a.status-badge {
    color: var(--color-text-headings);
}
body.dark-mode .health-card a.status-badge:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#site-preview-container h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.site-preview-iframe-wrapper {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid var(--color-glass-border);
    aspect-ratio: 16 / 10;
    background-color: rgba(0,0,0,0.1);
    position: relative;
    transition: all 0.3s ease-in-out;
}
.site-preview-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.concierge-log .log-item { padding: 1rem 0; border-bottom: 1px solid var(--color-glass-border); }
.concierge-log .log-item:last-child { border-bottom: none; }
#messages, #schedule { height: 100%; }
#messages.is-active, #schedule.is-active { display: flex; }
.calendar-container.glass-card, .messaging-container.glass-card { height: 100%; width: 100%; display: flex; flex-direction: column; }
.calendar-header { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--color-glass-border); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; text-align: center; flex-grow: 1; }
.calendar-grid .day-name { font-weight: 600; font-size: 0.9rem; }
.calendar-grid .day { padding: 10px; border-radius: 50%; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; }
.calendar-grid .day:not(:empty):hover { background: rgba(0,0,0,0.1); }
body.dark-mode .calendar-grid .day:not(:empty):hover { background: rgba(255,255,255,0.1); }
.calendar-grid .day.available { font-weight: bold; color: var(--color-accent); }
.calendar-grid .day.selected { background: var(--color-accent); color: #fff; }
body.dark-mode .calendar-grid .day.selected { color: #1D1D1F; }
.messaging-container.glass-card { flex-direction: row; padding: 0; }
.message-list { width: 35%; min-width: 300px; border-right: 1px solid var(--color-glass-border); overflow-y: auto; display: flex; flex-direction: column; }
.message-list-header { padding: 2rem 1.5rem 1.5rem; border-bottom: 1px solid var(--color-glass-border); flex-shrink: 0; }
.message-list-header h2 { margin: 0; }
.message-item { padding: 1.5rem; cursor: pointer; border-bottom: 1px solid var(--color-glass-border); }
.message-item:last-child { border-bottom: none; }
.message-item:hover { background: rgba(0,0,0,0.05); }
body.dark-mode .message-item:hover { background: rgba(255,255,255,0.05); }
.message-item.active { background: var(--color-accent); color: #fff; }
body.dark-mode .message-item.active { color: #1D1D1F; }
.message-item .msg-author { font-weight: bold; }
.message-item .msg-preview { font-size: 0.9rem; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.message-item.active .msg-preview { opacity: 1; }
.message-content { flex-grow: 1; display: flex; flex-direction: column; }
.message-bubbles-container { flex-grow: 1; padding: 1.5rem; overflow-y: auto; display: flex; flex-direction: column-reverse; }
.message-bubble { padding: 12px 20px; border-radius: 20px; margin-top: 1rem; max-width: 70%; line-height: 1.5; }
.message-bubble.received { background: var(--message-bubble-received-bg); color: var(--color-text-dark); border-bottom-left-radius: 4px; align-self: flex-start; }
.message-bubble.sent { background: var(--color-accent); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
body.dark-mode .message-bubble.sent { color: #1D1D1F; }
.message-bubble .message-link { color: white; text-decoration: underline; }
body.dark-mode .message-bubble.received .message-link { color: var(--color-accent); }
.message-composer { display: flex; align-items: center; padding: 1.5rem; border-top: 1px solid var(--color-glass-border); background: rgba(255, 255, 255, 0.1); flex-shrink: 0; }
.message-composer input { flex-grow: 1; border: 1px solid var(--color-glass-border); border-radius: 50px; padding: 12px 20px; background: rgba(255,255,255,0.5); margin-right: 1rem; }
body.dark-mode .message-composer input { background: rgba(255,255,255,0.1); }

.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
    margin: 0 10px;
}

.theme-switch input {
    display:none;
}

.slider {
    background-color: rgba(0,0,0,0.1);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-accent);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.theme-switch-wrapper .icon {
    color: var(--color-text-body);
    width: 24px;
    height: 24px;
}

.form-message {
    padding: 15px;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    text-align: left;
    line-height: 1.5;
    border: 1px solid transparent;
}
.form-success {
    color: #27ae60;
    background-color: rgba(46, 204, 113, 0.15);
    border-color: rgba(46, 204, 113, 0.3);
}
.form-error {
    color: #c0392b;
    background-color: rgba(192, 57, 43, 0.1);
    border-color: rgba(192, 57, 43, 0.2);
}
.info {
    color: #2980b9;
    background-color: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.2);
}

.project-card { 
    padding: 0; 
    overflow: hidden; 
}
.project-card img { 
    width: 100%; 
    height: 250px; 
    object-fit: cover; 
    display: block; 
}
.project-info { 
    padding: 1.5rem; 
}
.project-info h4 { 
    margin-top: 1rem; 
    color: var(--color-accent); 
}

.contact-section .grid-2 {
    align-items: start;
    gap: 3rem;
}
.contact-intro {
    position: -webkit-sticky;
    position: sticky;
    top: 150px;
}
.contact-intro p {
    font-size: 1.1rem;
    margin-bottom: 3rem;
}
.contact-methods-list {
    list-style: none;
    padding: 0;
}
.contact-method {
    display: flex;
    align-items: start;
    margin-bottom: 2rem;
}
.contact-method .icon {
    flex-shrink: 0;
    margin-right: 1.5rem;
    color: var(--color-accent);
}
.contact-method-info strong {
    display: block;
    color: var(--color-text-headings);
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.contact-method-info a {
    color: var(--color-text-body);
    transition: color var(--transition-speed);
}
.contact-method-info a:hover {
    color: var(--color-accent);
}
.contact-form-card {
    text-align: center;
}
.contact-form-card p {
    max-width: 300px;
    margin: 0 auto 2rem;
}
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid var(--color-glass-border);
    background: rgba(255,255,255,0.5);
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--color-text-dark);
    text-align: left;
}
body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    background: rgba(255,255,255,0.1);
    color: var(--color-text-body);
}

@media (max-width: 1024px) {
    .portal-sidebar {
        transform: translateX(-100%);
        z-index: 200;
        width: 300px;
    }
    .portal-layout.portal-nav-open .portal-sidebar {
        transform: translateX(0);
        box-shadow: 10px 0 40px rgba(0,0,0,0.2);
    }
    .portal-layout.portal-nav-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.3);
        z-index: 199;
    }
    .portal-main {
        margin-left: 0;
    }

    /* --- DÉBUT DE LA MODIFICATION 1 --- */
    .portal-main-header {
        display: flex;
        /* NOUVEAU : Centre le logo, car le bouton sera en position 'fixed' */
        justify-content: center;
    }
    
    .portal-main-header .portal-nav-toggle {
        display: block;
        background-color: var(--color-button-secondary-bg);
        border: 1px solid var(--color-glass-border);
        border-radius: 12px;
        width: 48px;
        height: 48px;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        
        /* --- DÉBUT DES AJOUTS --- */
        position: fixed; /* Rendre le bouton fixe */
        top: 1rem;       /* Position en haut (correspond au padding du header) */
        right: 1rem;     /* Position à droite (correspond au padding du header) */
        z-index: 150;    /* Au-dessus du contenu, mais sous la sidebar (qui est à 199) */
        /* --- FIN DES AJOUTS --- */
    }
    /* --- FIN DE LA MODIFICATION 1 --- */

    .portal-main-header .portal-nav-toggle:hover {
        background-color: var(--color-button-secondary-hover-bg);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .portal-content .content-header {
        display: none;
    }
    .portal-content .content-wrapper {
        padding-top: 1rem;
    }
    .health-status {
        flex-direction: column;
    }
    .messaging-container.glass-card {
        flex-direction: column;
        height: calc(100vh - 120px);
    }
    .message-list {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid var(--color-glass-border);
        max-height: 250px;
    }
    .message-content {
        height: 100%;
    }
    .portal-sidebar-close {
        display: block;
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--color-text-body);
        padding: 0.5rem;
        line-height: 1;
        transition: color 0.2s ease;
    }
    .portal-sidebar-close:hover {
        color: var(--color-accent);
    }
}

@media (max-width: 768px) {
    body.portal-page {
        padding-bottom: 0;
    }
    .portal-main {
        padding: 1rem;
    }
    .portal-main-header h1 { font-size: 1.5rem; }
    .portal-main-header p { display: none; }

    /* --- DÉBUT DE LA MODIFICATION 2 --- */
    /* AJOUT : Rapproche le bouton du bord sur les petits écrans */
    .portal-main-header .portal-nav-toggle {
        top: 0.5rem;
        right: 0.5rem;
    }
    /* --- FIN DE LA MODIFICATION 2 --- */

    .health-card .status-indicator {
        width: 80px;
        height: 80px;
    }
    .glass-card {
        padding: 0.5rem;
    }
    .btn-primary {
        padding: 10px 24px;
    }
    .site-preview-iframe-wrapper {
        max-width: 375px;
        aspect-ratio: 9 / 19.5;
    }
}

.client-messaging-container.glass-card {
    height: calc(100vh - 16rem);
    flex-direction: column;
    padding: 0;
}
.client-messaging-container .message-content {
    width: 100%;
}
.message-view-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-glass-border);
    flex-shrink: 0;
}
.message-view-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.logo-login {
    position: fixed;
    top: 25px;
    left: 40px;
    z-index: 110;
    text-decoration: none;
}

@media (max-width: 768px) {
    .logo-login {
        position: static;
        margin-bottom: 1.5rem;
        font-size: 2rem;
        text-align: center;
    }

    body.login-page {
        padding-top: 3rem;
    }
}

.theme-switcher-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

@media (max-width: 768px) {
    .theme-switcher-container {
        position: static;
        transform: none;
        margin-top: 2.5rem;
        margin-bottom: 1rem;
    }
}

.portal-sidebar-user {
    display: flex;
    align-items: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-glass-border);
}
.portal-sidebar-user svg {
    margin-right: 1rem;
    width: 24px;
    height: 24px;
    color: var(--color-text-headings);
    flex-shrink: 0;
}
.portal-sidebar-user span {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-text-headings);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-sidebar-close {
    display: none;
}

#info-drive-content .glass-card + .glass-card {
    margin-top: 2rem;
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0; /* MODIFICATION: padding revenu à 1rem */
    border-bottom: 1px solid rgba(0, 0, 0, 0.1); /* MODIFICATION: Séparateur plus visible */
    flex-wrap: wrap; /* Permet le passage à la ligne sur mobile */
}
body.dark-mode .document-item {
    border-bottom-color: rgba(255, 255, 255, 0.15); /* MODIFICATION: Séparateur dark */
}
.document-item:last-of-type {
    border-bottom: none;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.password-wrapper input {
    padding-right: 50px;
}
.toggle-password-visibility {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 50px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-body);
    opacity: 0.6;
    transition: opacity 0.2s ease;
}
.toggle-password-visibility:hover {
    opacity: 1;
}

.toggle-password-visibility svg {
    flex-shrink: 0;
}

.portal-section {
    padding: 0;
}

.link-button {
    display: inline-block;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    font-family: var(--font-body);
    font-weight: 600;
    background: none;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    text-align: center;
    padding: 0;
    transition: text-decoration 0.2s ease;
}

.link-button:hover {
    text-decoration: underline;
}

.btn.is-loading {
    position: relative;
    color: transparent !important;
    cursor: wait;
}

.btn.is-loading .loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

body.dark-mode .btn-primary.is-loading .loader {
    border-color: rgba(0, 0, 0, 0.4);
    border-top-color: #000000;
}
.btn-secondary.is-loading .loader {
    border-color: rgba(0, 0, 0, 0.4);
    border-top-color: var(--color-text-dark);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.portfolio-section .grid-2 {
    grid-template-columns: 1fr;
    gap: 3rem;
}

.project-card-casestudy {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    gap: 2.5rem;
    padding: 2.5rem;
}

@media (max-width: 992px) {
    .project-card-casestudy {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
}

.project-card-casestudy img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.project-card-casestudy .project-info {
    padding: 0;
}

.portfolio-filters {
    text-align: center;
    margin-bottom: 3rem;
}

.portfolio-filters .btn {
    margin: 0 5px 10px;
    background-color: var(--color-button-secondary-bg);
    color: var(--color-text-dark);
    border: 1px solid var(--color-glass-border);
}

.portfolio-filters .btn.active {
    background-color: var(--color-accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 122, 255, 0.3);
}

body.dark-mode .portfolio-filters .btn.active {
    color: var(--color-text-dark);
}

.portfolio-item {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.portfolio-item.hide {
    transform: scale(0.9);
    opacity: 0;
    display: none !important;
}

.project-image-carousel {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    aspect-ratio: 16 / 10;
}

.project-image-carousel .carousel-slider {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.project-image-carousel .carousel-slide {
    flex: 0 0 100%;
    height: 100%;
}

.project-image-carousel .carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-image-carousel .carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.project-image-carousel .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-text-body);
    opacity: 0.3;
    cursor: pointer;
    border: none;
    padding: 0;
    transition: all 0.3s ease;
}

.project-image-carousel .dot:hover {
    opacity: 0.6;
}

.project-image-carousel .dot.active {
    background-color: var(--color-accent);
    opacity: 1;
    transform: scale(1.1);
}

.process-timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding: 50px 0;
}

.process-step {
    position: relative;
    padding-left: 0;
    margin-bottom: 5rem;
}

.process-step:last-child {
    margin-bottom: 0;
}

.process-step-content.glass-card {
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem;
    padding-top: 5rem;
    text-align: center;
}

.process-step-content.glass-card:hover {
    transform: translateY(0);
}

.process-step-content h3 {
    margin-top: 0;
    color: var(--color-accent);
}

.process-step-number {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--color-accent);
    color: #fff;
    font-size: 2.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid var(--color-background-start);
    z-index: 1;
}

body.dark-mode .process-step-number {
    border-color: var(--color-background-end);
    color: #1D1D1F;
}

@media (max-width: 768px) {
    .process-timeline::after {
        left: 50%;
        top: 30px;
        bottom: 30px;
    }
    .process-step {
        padding-left: 0;
    }
    .process-step-number {
        width: 60px;
        height: 60px;
        font-size: 2rem;
        border-width: 4px;
    }
    .process-step-content.glass-card {
        margin-top: 0;
        padding-top: 4rem;
    }
}

.theme-visual-container {
    position: relative;
    width: 100%;
    max-width: 550px;
    aspect-ratio: 1 / 1;
    margin: auto;
}

.theme-visual-light,
.theme-visual-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    
    transition: opacity 0.8s ease-in-out;
}

.theme-visual-light {
    opacity: 1;
}
.theme-visual-dark {
    opacity: 0;
}

body.dark-mode .theme-visual-light {
    opacity: 0;
}
body.dark-mode .theme-visual-dark {
    opacity: 1;
}

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

.form-field-check {
    display: flex;
    align-items: center; /* Aligne verticalement la checkbox et le label */
    margin-bottom: 1rem;
    position: relative;
}

.form-field-check input[type="checkbox"] {
    cursor: pointer;
    width: 20px; /* Définit une taille fixe */
    height: 20px;
    flex-shrink: 0;
    margin: 0;
    margin-right: 12px;
    opacity: 1;
    position: static; /* Remet la case dans le flux normal */
}

.form-field-check label {
    cursor: pointer;
    line-height: 1.5;
    padding-left: 0; /* Supprime l'ancien padding qui causait le chevauchement */
}

.testimonial-slide.glass-card-static {
    background: var(--color-glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--color-glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all var(--transition-speed) ease-in-out;
    box-shadow: none; 
}

.testimonial-slide.glass-card-static:hover {
    box-shadow: none;
    transform: none;
}

.address-search-wrapper {
    position: relative;
}

.address-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-button-secondary-hover-bg);
    border: 1px solid var(--color-glass-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
}
body.dark-mode .address-results {
    background: var(--color-glass-bg);
}

.address-suggestion {
    padding: 12px 15px;
    cursor: pointer;
    font-size: 0.9rem;
}

.address-suggestion:hover {
    background-color: var(--color-accent);
    color: #fff;
}
body.dark-mode .address-suggestion:hover {
    color: var(--color-text-dark);
}

.portal-demo-section {
    overflow: hidden;
}

.portal-demo-section .container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    align-items: center;
    gap: 3rem;
}

.portal-demo-content p {
    font-size: 1.1rem;
    max-width: 450px;
    margin-bottom: 2rem;
}

.portal-demo-container {
    perspective: 1500px;
}

.demo-iframe-wrapper {
    border-radius: 12px;
    background: var(--portal-sidebar-bg);
    border: 1px solid var(--color-glass-border);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    transform: rotateY(-15deg) rotateX(5deg) scale(0.95);
    transition: transform 0.5s ease;
}

.portal-demo-section:hover .demo-iframe-wrapper {
    transform: rotateY(0) rotateX(0) scale(1);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.2);
}

.demo-iframe-header {
    height: 35px;
    background: var(--color-glass-bg);
    border-bottom: 1px solid var(--color-glass-border);
    display: flex;
    align-items: center;
    padding-left: 12px;
}
.demo-iframe-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    margin-right: 6px;
}
body.dark-mode .demo-iframe-header .dot {
    background: rgba(255,255,255,0.2);
}

.demo-iframe {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
}

body.is-demo .site-preview-iframe-wrapper iframe {
    pointer-events: none;
}

@media (max-width: 992px) {
    .portal-demo-section .container {
        grid-template-columns: 1fr;
    }
    .portal-demo-content {
        text-align: center;
    }
    .portal-demo-content p {
        margin-left: auto;
        margin-right: auto;
    }
    .demo-iframe-wrapper {
        transform: scale(1);
    }
}

.portal-video-section {
    overflow: hidden;
}

.portal-video-section .container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    gap: 3rem;
}

.portal-video-content p {
    font-size: 1.1rem;
    max-width: 450px;
    margin-bottom: 2rem;
}

.portal-video-container {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    background: var(--color-glass-bg);
    border: 1px solid var(--color-glass-border);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    overflow: hidden;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0,0,0,0.05), rgba(0,0,0,0.1));
    color: var(--color-text-headings);
    opacity: 0.6;
}

.video-placeholder svg {
    color: var(--color-text-headings);
}

body.dark-mode .video-placeholder {
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.1));
}

@media (max-width: 992px) {
    .portal-video-section .container {
        grid-template-columns: 1fr;
    }
    .portal-video-content {
        text-align: center;
    }
    .portal-video-content p {
        margin-left: auto;
        margin-right: auto;
    }
}

.features-list-home {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}
.features-list-home li {
    display: flex;
    align-items: start;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}
.features-list-home li svg {
    flex-shrink: 0;
    margin-right: 0.75rem;
    color: var(--color-accent);
    margin-top: 5px;
}

.portal-main {
    display: flex;
    flex-direction: column;
    padding: 0; 
}

.portal-main-header {
    flex-shrink: 0;
    padding: 1rem 1rem 0 1rem;
}

.portal-section.portal-content:not(#schedule) {
     padding: 0 1rem 1rem 1rem;
}

.portal-section#schedule.is-active {
    flex-grow: 1;
    padding: 0;
    height: 100px; 
    overflow: hidden;
}

#schedule .calendly-inline-widget {
    width: 100%;
    margin-top: -66px !important;
    height: calc(100% + 66px) !important;
    min-height: 700px;
}

@media (max-width: 768px) {
    .portal-main-header {
        padding: 0.5rem 0.5rem 0 0.5rem;
    }
    .portal-section.portal-content:not(#schedule) {
         padding: 0 0.5rem 0.5rem 0.5rem;
    }
    
    #schedule .calendly-inline-widget {
        margin-top: -66px !important;
        height: calc(100% + 66px) !important;
    }
}

.publication-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.publication-item h3 {
    color: var(--color-accent);
    font-size: 1.4rem;
}

.publication-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-body);
    opacity: 0.7;
    margin-bottom: 1rem;
}

.publication-item .btn {
    margin-top: auto;
}

.publication-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.publication-item h3 {
    color: var(--color-accent);
    font-size: 1.4rem;
}

.publication-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-body);
    opacity: 0.7;
    margin-bottom: 1rem;
}

.publication-item .btn {
    margin-top: auto;
}

.publication-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.publication-item h3 {
    color: var(--color-accent);
    font-size: 1.4rem;
}

.publication-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-body);
    opacity: 0.7;
    margin-bottom: 1rem;
}

.publication-item .btn {
    margin-top: auto;
}

.publication-page-header {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
}
.btn-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--color-glass-bg);
    border: 1px solid var(--color-glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.btn-back-link:hover {
    background: var(--color-button-secondary-hover-bg);
    transform: translateY(-2px);
}

.publication-page-hero {
    min-height: auto;
    padding-top: 140px;
    padding-bottom: 4rem;
    text-align: center;
}
.publication-page-category {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.publication-page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    max-width: 900px;
}
.publication-page-summary {
    font-size: 1.1rem;
    max-width: 700px;
    margin-bottom: 2rem;
    opacity: 0.9;
}
.publication-page-author {
    font-weight: 600;
    opacity: 0.7;
}

.article-content-section {
    padding-top: 0;
    padding-bottom: 6rem;
}

.article-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: clamp(1.5rem, 5vw, 3rem);
}

.article-content-wrapper p,
.article-content-wrapper li {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text-body);
}

.article-content-wrapper .article-intro {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-text-headings);
    line-height: 1.7;
}

.article-content-wrapper h2 {
    font-size: 1.8rem;
    color: var(--color-accent);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-glass-border);
}

.article-content-wrapper h3 {
    font-size: 1.4rem;
    color: var(--color-text-headings);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content-wrapper blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    border-left: 5px solid var(--color-accent);
    background: rgba(0,0,0,0.03); 
    border-radius: 0 8px 8px 0;
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 500;
}
body.dark-mode .article-content-wrapper blockquote {
    background: rgba(255,255,255,0.05);
}

.article-content-wrapper ul {
    list-style-type: disc;
    padding-left: 30px;
    margin-bottom: 1.5rem;
}

.article-content-wrapper hr {
    border: none;
    border-top: 1px solid var(--color-glass-border);
    margin: 3rem auto;
}

@media (max-width: 768px) {
    .publication-page-header {
        top: 10px;
        left: 10px;
    }
    .publication-page-hero {
        padding-top: 100px;
    }
}

/* --- STYLES AMÉLIORÉS POUR LA TIMELINE PROJET (VERSION FINALE) --- */

.project-timeline-container {
    padding: 3rem 4rem;
    overflow: hidden;
}

@media (max-width: 768px) {
    .project-timeline-container {
        padding: 2.5rem 1.5rem;
    }
}

.project-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding-top: 1rem;
    padding-bottom: 3.5rem;
    --progress-percent: 0%; 
}

.project-timeline::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--color-glass-border);
    border-radius: 2px;
    z-index: 0;
}

.project-timeline::after {
    content: '';
    position: absolute;
    top: 24px;
    left: 0;
    width: calc(var(--progress-percent, 0) * 1%);
    height: 4px;
    background-color: var(--color-accent);
    border-radius: 2px;
    z-index: 1;
    transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}


.timeline-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--color-background-start);
    border: 4px solid var(--color-glass-border);
    transition: all 0.4s ease;
}

.timeline-label {
    position: absolute;
    top: 100%;
    left: 50%;
    margin-top: 2.5rem; 
    font-size: 1.0rem;
    font-weight: 500;
    color: var(--color-text-body);
    width: 110px; 
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    line-height: 1.3;
    transform: translateX(-50%) translateY(10px);
    text-align: center;
}

.timeline-step.completed .timeline-dot {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}
.timeline-step.completed .timeline-label {
    opacity: 1;
    font-weight: 600;
    transform: translateX(-50%) translateY(0);
}

.timeline-step.active .timeline-dot {
    width: 28px; 
    height: 28px;
    margin-top: -6px; 
    border-width: 5px;
    border-color: var(--color-accent);
    background-color: var(--color-background-start);
    animation: pulse 2s infinite ease-in-out;
}
body.dark-mode .timeline-step.active .timeline-dot {
    background-color: var(--color-background-end);
    animation: pulse-dark 2s infinite ease-in-out;
}
.timeline-step.active .timeline-label {
    opacity: 1;
    font-weight: 700; 
    color: var(--color-accent);
    font-size: 1.1rem; 
    transform: translateX(-50%) translateY(0);
}

/* --- DÉBUT DE LA MODIFICATION 3 --- */
/* --- GESTION AFFICHAGE TIMELINE DESKTOP/MOBILE --- */
.project-checklist-mobile {
    display: none;
}

@media (max-width: 768px) {
    .project-timeline {
        display: none; /* Cacher la version desktop */
    }
    .project-checklist-mobile {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .checklist-item {
        display: flex;
        align-items: center;
        padding: 12px;
        border-radius: 8px;
        background-color: rgba(0,0,0,0.02);
        border: 1px solid var(--color-glass-border);
        transition: all 0.3s ease;
    }
    body.dark-mode .checklist-item {
        background-color: rgba(255,255,255,0.02);
    }

    /* Style des icônes */
    .checklist-icon {
        width: 24px;
        height: 24px;
        margin-right: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    /* Style des labels */
    .checklist-label {
        font-size: 1rem;
        font-weight: 500;
        color: var(--color-text-body);
        opacity: 0.7;
    }

    /* --- États --- */
    
    /* Complété */
    .checklist-item.completed {
        border-color: rgba(46, 204, 113, 0.3);
        background-color: rgba(46, 204, 113, 0.05);
    }
    .checklist-item.completed .checklist-label {
        opacity: 1;
        font-weight: 600;
        color: var(--color-text-headings);
    }

    /* En cours */
    .checklist-item.current {
        border-color: var(--color-accent);
        background-color: rgba(0, 122, 255, 0.05);
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        transform: scale(1.02);
    }
    .checklist-item.current .checklist-label {
        opacity: 1;
        font-weight: 700;
        color: var(--color-accent);
    }

    /* Futur (Pending) */
    .checklist-item.pending .checklist-icon .pending-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background-color: var(--color-glass-border);
    }

    /* Animation Loader pour l'état 'current' */
    .loader-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: var(--color-accent);
        animation: pulse 1.5s infinite ease-in-out;
    }

    .contact-intro {position: static;}
}
/* --- FIN DE LA MODIFICATION 3 --- */

@keyframes pulse {
    0% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.7);
    }
    70% { 
        transform: scale(1); 
        box-shadow: 0 0 0 6px rgba(0, 122, 255, 0);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(0, 122, 255, 0);
    }
}

@keyframes pulse-dark {
    0% { 
        transform: scale(1.1); 
        box-shadow: 0 0 25px 5px var(--color-accent); 
    }
    50% { 
        transform: scale(1.15); 
        box-shadow: 0 0 35px 12px var(--color-accent); 
    }
    100% { 
        transform: scale(1.1); 
        box-shadow: 0 0 25px 5px var(--color-accent); 
    }
}

/* --- Styles pour l'affichage amélioré des documents --- */
.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0; /* MODIFICATION: padding revenu à 1rem */
    border-bottom: 1px solid rgba(0, 0, 0, 0.1); /* MODIFICATION: Séparateur plus visible */
    flex-wrap: wrap; /* Permet le passage à la ligne sur mobile */
}
body.dark-mode .document-item {
    border-bottom-color: rgba(255, 255, 255, 0.15); /* MODIFICATION: Séparateur dark */
}
.document-item:last-of-type {
    border-bottom: none;
}

.document-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-right: 1rem;
    min-width: 200px; /* Empêche le texte d'être trop écrasé */
}

.document-name {
    font-weight: 600;
    color: var(--color-text-headings);
    word-break: break-all; /* Coupe les noms de fichiers longs */
}

.document-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem; /* Espace vertical et horizontal */
    font-size: 0.9rem;
    color: var(--color-text-body);
    opacity: 0.9;
    margin-top: 5px;
}

.document-detail-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.document-detail-item strong {
    color: var(--color-text-body);
    font-weight: 600;
    opacity: 0.7;
}

body.dark-mode .document-detail-item strong {
    opacity: 1;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0; /* Empêche les boutons de passer à la ligne */
}

/* --- Responsive pour la liste des documents --- */
@media (max-width: 550px) {
    .document-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .document-info {
        margin-right: 0;
        width: 100%;
    }
    
    /* --- MODIFICATION ICI : Nouvelle règle pour le nom du document et le badge --- */
    .document-name {
        display: flex; /* Utilise flexbox pour aligner le nom et le badge */
        flex-wrap: wrap; /* Permet au badge de passer à la ligne si le nom est très long */
        align-items: baseline; /* Aligne le texte du nom et le centre du badge */
        gap: 10px; /* Espace entre le nom et le badge */
        margin-bottom: 5px; /* Petit espace sous le nom/badge avant les détails */
    }

    .document-name .status {
        margin-left: 0; /* Supprime le margin-left qui posait problème */
    }
    /* --- FIN DE LA MODIFICATION --- */

    .document-details {
        margin-top: 0; /* Réinitialise le margin-top si présent, pour éviter un double espacement */
        font-size: 0.85rem; /* Réduit un peu la taille pour les détails sur mobile */
    }

    .document-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .document-actions .btn {
        flex-grow: 1; /* Les boutons prennent la même largeur */
        text-align: center;
    }
}
/* --- Style pour le badge de statut à côté du nom du document --- */
.document-name .status {
    margin-left: 10px;
    vertical-align: middle;
    /* La taille est déjà définie par .status, mais on s'assure qu'elle est correcte */
    font-size: 0.8rem;
    padding: 4px 10px; 
}
/* --- Styles pour les onglets des documents du portail client --- */
.tabs-container-client {
    padding: 0; /* Retire le padding de la glass-card de base */
}

.tabs-container-client .tab-buttons {
    display: flex;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1); /* MODIFICATION: Séparateur plus visible */
    padding: 0 1.5rem; /* Ajoute un padding horizontal à la barre d'onglets */
}
body.dark-mode .tabs-container-client .tab-buttons {
    border-bottom-color: rgba(255, 255, 255, 0.15); /* MODIFICATION: Séparateur dark */
}

.tabs-container-client .tab-button {
    padding: 1rem 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--color-text-body);
    font-weight: 600;
    position: relative;
    opacity: 0.7;
    transition: opacity 0.2s ease, color 0.2s ease;
    font-size: 1rem;
    margin-bottom: -1px; /* Permet à la bordure active de recouvrir celle du conteneur */
}

.tabs-container-client .tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tabs-container-client .tab-button.active {
    opacity: 1;
    color: var(--color-text-headings);
}

.tabs-container-client .tab-button.active::after {
    transform: scaleX(1);
}

.tabs-container-client .tab-content {
    display: none;
    /* Ajoute un padding au contenu de l'onglet */
    padding: 0.5rem 1.5rem 1.5rem 1.5rem; 
}

.tabs-container-client .tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* --- Styles des onglets sur mobile --- */
@media (max-width: 550px) {
    .tabs-container-client .tab-buttons {
        padding: 0 0.5rem;
    }
    .tabs-container-client .tab-button {
        padding: 1rem 1rem;
        font-size: 0.9rem;
        flex-grow: 1; /* Fait en sorte que les onglets remplissent la largeur */
        text-align: center;
    }
    .tabs-container-client .tab-content {
        padding: 0.5rem 0.5rem 1rem 0.5rem; /* Réduit le padding sur mobile */
    }
}

/*
--- STYLES DE CORRECTION POUR LA MODALE DE CONFIRMATION ---
*/

/* 1. Titre */
.confirmation-modal-h2 {
    font-size: 1.8rem; /* Plus petit que le H2 par défaut */
    text-align: left;
    line-height: 1.3;
    padding: 1.5rem 1.5rem 0 1.5rem; /* Ajouté pour l'espacement */
}

/* 2. Corps de la modale */
.confirmation-modal-body {
    text-align: left; /* Aligne tout le texte à gauche */
    padding-top: 1.5rem; /* Espace sous le titre */
}

/* 3. Paragraphe de message */
.confirmation-modal-body #confirmation-modal-message {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem; /* Espace avant les champs */
}

/* 4. Conteneur des champs (pour le cacher/montrer) */
.confirmation-modal-body #confirmation-extra-fields {
     margin-bottom: 1.5rem; /* Espace avant la checkbox */
}

/* 5. Champ de date (caché par défaut) */
.confirmation-modal-body #payment-date-field-modal {
    display: none; /* Caché par défaut, géré par JS */
    text-align: left;
}

/* 6. Label du champ de date */
.confirmation-modal-body #payment-date-field-modal label {
    font-weight: 600; 
    margin-bottom: 0.5rem; 
    display: block;
    color: var(--color-text-headings);
}

/* 7. Input du champ de date */
.confirmation-modal-body #payment-date-field-modal input[type="date"] {
    width: 100%; 
    padding: 10px 15px; 
    border-radius: 8px; 
    border: 1px solid var(--color-glass-border); 
    background: var(--color-button-secondary-bg); 
    font-family: var(--font-body); 
    font-size: 1rem; 
    color: var(--color-text-dark);
}
body.dark-mode .confirmation-modal-body #payment-date-field-modal input[type="date"] {
     background: rgba(255, 255, 255, 0.1);
}

/* 8. CORRECTION DE LA CHECKBOX (Spécifique à cette modale) */
.confirmation-modal-check {
    /* Rétablit un flexbox propre */
    display: flex !important; 
    align-items: center !important;
    position: static !important;
    margin-top: 0;
}

.confirmation-modal-check input[type="checkbox"] {
    /* Annule les styles de style.css qui la cachent */
    opacity: 1 !important;
    position: static !important;
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
    margin-right: 12px; /* Crée l'espace */
}

.confirmation-modal-check label {
    /* Annule le padding qui décale le texte */
    padding-left: 0 !important;
    font-size: 0.9rem;
    color: var(--color-text-body);
}

.confirmation-modal-check label::before,
.confirmation-modal-check label::after {
    /* Désactive la fausse checkbox de style.css */
    display: none !important;
}

/* --- Styles de la Modale (Identique Admin) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.modal-overlay.is-visible .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text-body);
    cursor: pointer;
    line-height: 1;
}

.modal-footer {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Ajustement mobile */
@media (max-width: 500px) {
    .modal-footer {
        flex-direction: column;
    }
    .modal-footer .btn {
        width: 100%;
    }
}

/* --- Correction Style Modale (Style "Admin") --- */

/* Rendre le fond de la modale beaucoup plus opaque pour la lisibilité */
.modal-content.glass-card {
    background: rgba(248, 249, 250, 0.95) !important; /* Quasi opaque blanc/gris */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    color: #1D1D1F;
}

/* Adaptation pour le mode sombre */
body.dark-mode .modal-content.glass-card {
    background: rgba(30, 32, 45, 0.95) !important; /* Bleu nuit profond opaque */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #E1E1E6;
}

/* Amélioration des champs de saisie à l'intérieur de la modale */
.modal-content .form-field input {
    background: #ffffff;
    border: 1px solid #d1d1d6;
    color: #1D1D1F;
}

body.dark-mode .modal-content .form-field input {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Espacement interne plus confortable */
.modal-content {
    padding: 2.5rem !important;
    border-radius: 24px !important;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.modal-content p {
    font-size: 1.05rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* --- NOUVEAU STYLE SPÉCIFIQUE FONDATEUR (V4) --- */

.founder-portrait {
    position: relative;
    overflow: hidden;
    /* Taille forcée et réduite pour être bien plus petit */
    width: 350px; 
    height: 350px;
    margin: 0 auto; /* Centrage */
    
    /* Visuel */
    box-shadow: 0 15px 35px rgba(0, 122, 255, 0.2);
    background: linear-gradient(135deg, var(--color-accent), #4ca9ff);
    
    /* Animation spécifique "morph-founder" */
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph-founder 12s ease-in-out infinite;
    transition: all 0.3s ease;
}

.founder-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05); /* Zoom léger pour éviter les bords blancs */
    display: block;
}

/* Nouvelle animation différente de la précédente */
@keyframes morph-founder {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    50% {
        border-radius: 40% 60% 60% 40% / 40% 60% 40% 60%; /* Plus rond au milieu */
    }
    75% {
        border-radius: 70% 30% 30% 60% / 30% 40% 60% 50%;
    }
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

/* Ajustement Mobile */
@media (max-width: 900px) {
    .founder-portrait {
        width: 200px;
        height: 200px;
        margin-bottom: 2rem;
    }
}

/* --- Styles pour les cartes Valeurs (Style identique Accueil) --- */

.value-card {
    text-align: center; /* Centre tout le contenu comme sur l'image */
    padding: 3rem 2rem; /* Padding généreux */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Effet au survol : la carte remonte légèrement */
.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Style de l'icône : Grande, bleue, centrée */
.value-card .card-icon {
    color: var(--color-accent); /* Le bleu Aura (#007AFF) */
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.value-card .card-icon svg {
    /* Taille ajustée pour correspondre à l'image */
    width: 48px; 
    height: 48px;
    stroke-width: 1.5; /* Trait fin et élégant */
}

.value-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.value-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-body);
    opacity: 0.9;
    margin-bottom: 0;
}