/* ============================================================
   ENTREPRIZIO - CSS Global
   ============================================================ */

:root {
    --noir: #1a1a1a;
    --or: #d4af37;
    --bleu: #0a2463;
    --gris: #f8f9fa;
    --blanc: #ffffff;
    --vert: #28a745;
    --rouge: #dc3545;
    --ombre: 0 5px 20px rgba(0,0,0,0.12);
    --radius: 10px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.8;
    color: var(--noir);
    background: var(--gris);
    overflow-x: hidden;
}

/* ============================================================
   HEADER
   ============================================================ */
#main-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26,26,26,0.97);
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.3);
}

.logo-img { height: 48px; }

.menu-toggle { display: none; cursor: pointer; color: white; font-size: 1.5em; }

nav { display: flex; align-items: center; gap: 5px; }

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 5px;
    transition: var(--transition);
    font-size: 0.9em;
}

nav a:hover { color: var(--or); }

.btn-nav-client {
    background: var(--or);
    color: var(--noir) !important;
    border-radius: 20px !important;
}

.btn-nav-client:hover { background: white !important; color: var(--bleu) !important; }

.btn-nav-login {
    background: rgba(212,175,55,0.2);
    border: 1px solid var(--or);
    color: var(--or) !important;
    border-radius: 20px !important;
}

.btn-nav-logout { color: #aaa !important; font-size: 0.85em !important; }

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
    display: inline-block;
    background: var(--or);
    color: var(--noir);
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 1em;
}

.btn:hover { background: var(--bleu); color: var(--blanc); transform: translateY(-2px); }
.btn-bleu { background: var(--bleu); color: white; }
.btn-bleu:hover { background: #07193a; color: white; }
.btn-sm { padding: 7px 18px; font-size: 0.85em; }
.btn-danger { background: var(--rouge); color: white; }
.btn-success { background: var(--vert); color: white; }
.btn-outline { background: transparent; border: 2px solid var(--or); color: var(--or); }
.btn-outline:hover { background: var(--or); color: var(--noir); }

/* ============================================================
   HERO SECTIONS
   ============================================================ */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(10,36,99,0.82), rgba(10,36,99,0.82)),
                url('https://images.unsplash.com/photo-1556740738-b6a63e27c4df?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 20px;
    padding-top: 80px;
}

.hero-sm { height: 55vh; }

.hero-content { max-width: 900px; }

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2em, 5vw, 4em);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p { font-size: 1.1em; margin-bottom: 30px; max-width: 650px; margin-left: auto; margin-right: auto; opacity: 0.92; }

/* ============================================================
   SECTIONS
   ============================================================ */
section { padding: 80px 20px; }
.section-blanc { background: var(--blanc); }
.section-gris { background: var(--gris); }
.section-bleu { background: var(--bleu); color: white; }

.container { max-width: 1200px; margin: 0 auto; }
.container-sm { max-width: 800px; margin: 0 auto; }
.container-md { max-width: 1000px; margin: 0 auto; }

h2.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6em, 3vw, 2.2em);
    text-align: center;
    margin-bottom: 50px;
    color: var(--bleu);
}

.section-bleu h2.section-title { color: white; }

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

.card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.15); }
.card-body { padding: 25px; }
.card-title { font-family: 'Playfair Display', serif; color: var(--bleu); font-size: 1.3em; margin-bottom: 10px; }

/* Grid responsive */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 25px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); gap: 25px; }

/* ============================================================
   FORMULAIRES
   ============================================================ */
.form-container {
    background: var(--blanc);
    border-radius: var(--radius);
    box-shadow: var(--ombre);
    padding: 35px;
    max-width: 800px;
    margin: 100px auto 60px;
}

.form-container .form-title {
    font-family: 'Playfair Display', serif;
    color: var(--bleu);
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 8px;
}

.form-container .form-subtitle { text-align: center; color: #666; margin-bottom: 30px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--noir); font-size: 0.92em; }
.form-group label span.required { color: var(--rouge); margin-left: 3px; }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #ddd;
    border-radius: 7px;
    font-family: inherit;
    font-size: 0.95em;
    transition: border-color 0.2s;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--bleu);
    box-shadow: 0 0 0 3px rgba(10,36,99,0.08);
}

.form-group textarea { min-height: 110px; resize: vertical; }

.section-form-title {
    font-family: 'Playfair Display', serif;
    color: var(--bleu);
    font-size: 1.2em;
    margin: 30px 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--or);
}

.radio-group { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 8px; }
.radio-item { display: flex; align-items: center; gap: 8px; }
.radio-item input[type="radio"] { width: auto; }

.info-box {
    background: #f0f4ff;
    border-left: 4px solid var(--bleu);
    padding: 12px 15px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 0.88em;
    color: #444;
}

.info-box i { color: var(--or); margin-right: 6px; }

.multi-row { display: flex; gap: 10px; margin-bottom: 8px; align-items: center; }
.multi-row input { flex: 1; }
.btn-remove { background: var(--rouge); color: white; border: none; padding: 6px 10px; border-radius: 5px; cursor: pointer; flex-shrink: 0; }
.btn-add-row { background: var(--gris); border: 1px dashed #aaa; padding: 7px 15px; border-radius: 5px; cursor: pointer; font-size: 0.88em; margin-top: 5px; }

/* Alerte messages */
.alert { padding: 14px 18px; border-radius: 8px; margin: 15px 0; font-size: 0.93em; display: flex; align-items: center; gap: 10px; }
.alert-success { background: rgba(40,167,69,0.12); border: 1px solid var(--vert); color: #155724; }
.alert-danger  { background: rgba(220,53,69,0.12); border: 1px solid var(--rouge); color: #721c24; }
.alert-info    { background: rgba(10,36,99,0.08); border: 1px solid var(--bleu); color: var(--bleu); }
.alert-warning { background: #fff9e6; border: 1px solid var(--or); color: #856404; }

/* ============================================================
   BADGES STATUTS
   ============================================================ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78em;
    font-weight: 600;
}

.badge-warning  { background: #fff9e6; color: #856404; border: 1px solid #d4af37; }
.badge-success  { background: rgba(40,167,69,0.15); color: #155724; }
.badge-info     { background: rgba(10,36,99,0.1); color: var(--bleu); }
.badge-danger   { background: rgba(220,53,69,0.12); color: #721c24; }
.badge-secondary{ background: #e2e8f0; color: #555; }

/* ============================================================
   DASHBOARD (espaces client/admin)
   ============================================================ */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 75px;
}

.sidebar {
    width: 250px;
    background: var(--bleu);
    color: white;
    flex-shrink: 0;
    padding: 30px 0;
    position: fixed;
    height: calc(100vh - 75px);
    top: 75px;
    overflow-y: auto;
}

.sidebar-logo { text-align: center; padding: 0 20px 25px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px; }
.sidebar-logo img { height: 40px; }

.sidebar-user { padding: 0 20px 20px; font-size: 0.85em; opacity: 0.7; }

.sidebar nav { display: flex; flex-direction: column; gap: 3px; padding: 0 10px; }

.sidebar nav a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 7px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    margin: 0;
}

.sidebar nav a:hover, .sidebar nav a.active {
    background: rgba(255,255,255,0.15);
    color: white;
}

.sidebar nav a i { width: 18px; text-align: center; }

.sidebar-badge {
    margin-left: auto;
    background: var(--rouge);
    color: white;
    font-size: 0.72em;
    padding: 2px 7px;
    border-radius: 10px;
}

.dashboard-content {
    margin-left: 250px;
    flex: 1;
    padding: 35px;
    background: var(--gris);
    min-height: calc(100vh - 75px);
}

.page-header { margin-bottom: 30px; }
.page-header h1 { font-family: 'Playfair Display', serif; color: var(--bleu); font-size: 1.7em; }
.page-header p { color: #666; margin-top: 5px; }

/* Stat cards dashboard */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 20px; margin-bottom: 30px; }

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--ombre);
    text-align: center;
}

.stat-card .stat-number { font-size: 2.2em; font-weight: 700; color: var(--bleu); }
.stat-card .stat-label { font-size: 0.82em; color: #666; margin-top: 5px; }
.stat-card .stat-icon { font-size: 1.8em; color: var(--or); margin-bottom: 10px; }

/* Table admin */
.data-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--ombre); }
.data-table th { background: var(--bleu); color: white; padding: 13px 15px; text-align: left; font-size: 0.85em; font-weight: 600; }
.data-table td { padding: 12px 15px; border-bottom: 1px solid #f0f0f0; font-size: 0.88em; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8faff; }

/* Upload zone */
.upload-zone {
    border: 2px dashed var(--or);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    background: #fffdf0;
    cursor: pointer;
    transition: var(--transition);
}

.upload-zone:hover { background: #fff9e0; border-color: var(--bleu); }
.upload-zone i { font-size: 2.5em; color: var(--or); margin-bottom: 10px; }

/* Fil de discussion */
.message-thread { display: flex; flex-direction: column; gap: 15px; max-height: 500px; overflow-y: auto; padding: 10px; }

.message-bubble { max-width: 75%; padding: 12px 16px; border-radius: 15px; }
.message-client { background: var(--gris); align-self: flex-start; border-bottom-left-radius: 4px; }
.message-admin  { background: var(--bleu); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
.message-meta   { font-size: 0.75em; opacity: 0.65; margin-top: 4px; }

/* ============================================================
   FOOTER
   ============================================================ */
#main-footer {
    background: var(--noir);
    color: white;
    padding: 50px 20px 30px;
    text-align: center;
}

.footer-inner { max-width: 900px; margin: 0 auto; }
.footer-logo { margin-bottom: 25px; }

.footer-links, .footer-regions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px 20px;
    margin-bottom: 15px;
}

.footer-links a, .footer-regions a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.2s;
}

.footer-links a:hover, .footer-regions a:hover { color: var(--or); }

.social-links { display: flex; justify-content: center; gap: 20px; margin: 20px 0; }
.social-links a { color: white; font-size: 1.2em; transition: color 0.2s; }
.social-links a:hover { color: var(--or); }

.footer-legal { font-size: 0.8em; color: rgba(255,255,255,0.5); margin-top: 20px; line-height: 1.6; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animated { opacity: 0; }
.animated.visible { animation: fadeIn 0.6s ease-out forwards; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: var(--transition); z-index: 500; }
    .sidebar.open { transform: translateX(0); }
    .dashboard-content { margin-left: 0; padding: 20px; }
}

@media (max-width: 767px) {
    .menu-toggle { display: block; }

    nav {
        position: fixed;
        top: 73px;
        left: 0;
        width: 100%;
        background: rgba(26,26,26,0.98);
        flex-direction: column;
        padding: 20px;
        gap: 5px;
        clip-path: circle(0px at 95% -5%);
        transition: clip-path 0.4s ease-out;
        pointer-events: none;
    }

    nav.active { clip-path: circle(1500px at 95% -5%); pointer-events: all; }

    .form-container { margin: 90px 15px 40px; padding: 25px 20px; }
    .radio-group { flex-direction: column; gap: 8px; }
    .multi-row { flex-direction: column; }
    .stat-cards { grid-template-columns: repeat(2,1fr); }
}
