:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --ink: #1f2933;
    --muted: #6b7280;
    --bg: #f7f8fa;
    --line: #e5e7eb;
    --green: #1f9d55;
    --red: #d64545;
    --blue: #2563eb;
    --grey: #64748b;
    --radius: 12px;
    --shadow: 0 6px 18px rgba(17, 24, 39, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--ink);
    background: #fff;
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1140px, 92%); margin: 0 auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.narrow { max-width: 720px; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    font-size: 0.95rem;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.4); color: inherit; }
.btn-light { background: #fff; color: var(--primary); }
.btn-danger { background: var(--red); color: #fff; }
.btn-info { background: #156fc9; color: #fff; }
.btn-info:hover { background: #0d4a99; color: #fff; }
.btn-block { width: 100%; text-align: center; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 0; }
.brand { font-size: 1.4rem; font-weight: 800; letter-spacing: .5px; display: inline-flex; align-items: center; flex-direction: column; text-align: center; gap: 0.15rem; }
.brand-mark { color: var(--primary); }
.brand-rest { color: var(--ink); }
.brand-logo { display: block; max-height: 64px; width: auto; }
.brand-tagline { display: block; font-size: 0.8rem; color: var(--muted); letter-spacing: 0.8px; text-transform: uppercase; }
.main-nav { display: flex; align-items: center; gap: 1.4rem; }
.main-nav a { color: var(--ink); font-weight: 500; }
.main-nav a.active { color: var(--primary); }
.nav-cta { color: #fff; }
.nav-toggle, .nav-toggle-label { display: none; }

/* Hero */
.hero { background: linear-gradient(135deg, #156fc9); color: #fff; padding: 4rem 0; }
.hero-inner { display: flex; gap: 3rem; align-items: center; flex-wrap: wrap; }
.hero-text { flex: 1 1 360px; }
.hero-text h1 { font-size: 2.6rem; margin: 0 0 1rem; line-height: 1.15; }
.hero-text p { font-size: 1.15rem; opacity: .92; max-width: 540px; }
.hero-actions { margin-top: 1.6rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.stat { background: rgba(255,255,255,.12); border-radius: var(--radius); padding: 1.2rem 1.5rem; text-align: center; min-width: 110px; }
.stat-num { display: block; font-size: 2rem; font-weight: 800; }
.stat-label { opacity: .85; font-size: .9rem; }

/* Sections */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section-head h2 { font-size: 2rem; margin: 0 0 .5rem; }
.section-head p { color: var(--muted); }

.page-header { background: var(--bg); padding: 3rem 0; border-bottom: 1px solid var(--line); }
.page-header h1 { margin: 0 0 .4rem; font-size: 2.2rem; }
.page-header p { color: var(--muted); margin: 0; }
.page-header-actions { margin-top: 1.5rem; }
.page-header--blue { background: linear-gradient(135deg, rgba(37,99,235,.95), rgba(37,99,235,.80)); color: #fff; }
.page-header--blue h1, .page-header--blue p { color: #fff; }
.page-header--blue .page-header-actions a { border-color: rgba(255,255,255,.25); }

.service-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.service-highlight { background: #fff; border-radius: var(--radius); border: 1px solid rgba(37,99,235,0.12); padding: 1.2rem 1.3rem; box-shadow: var(--shadow); }
.service-highlight strong { display: block; margin-bottom: 0.75rem; color: var(--primary); font-size: 1.05rem; }
.service-highlight p { margin: 0; color: var(--muted); line-height: 1.7; }

/* Cards grid */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.card-link { display: block; text-decoration: none; color: inherit; height: 100%; }
.card { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); transition: transform .3s ease, box-shadow .3s ease, opacity .4s ease; height: 100%; overflow: hidden; position: relative; }
.service-card { opacity: 0; transform: translateY(20px); display: flex; flex-direction: column; min-height: 220px; color: #fff; background-size: cover; background-position: center; border-color: transparent; }
.service-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21,111,201,0.35), rgba(21,111,201,0.75)); z-index: 0; }
.service-card > * { position: relative; z-index: 1; }
.service-card.visible { opacity: 1; transform: translateY(0); }
.card-link:hover .service-card { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(17, 24, 39, 0.24); }
.service-card .card-icon { font-size: 2rem; margin-bottom: .7rem; color: #fff; }
.service-card h3 { margin: 0 0 .6rem; color: #fff; font-size: 1.2rem; }
.service-card p { flex: 1 1 auto; color: rgba(255,255,255,0.95); line-height: 1.6; font-size: 0.96rem; margin-bottom: 1rem; }
.service-card .cta-card { display: inline-flex; align-items: center; justify-content: center; padding: 0.55rem 1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.85); color: #fff; background: rgba(255,255,255,0.08); font-size: 0.85rem; transition: background .2s ease, transform .2s ease; }
.service-card .cta-card:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px); }
.cards-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 2rem 0 1.5rem; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 1.1rem 1.3rem; text-align: center; box-shadow: var(--shadow); }
.stat-card strong { display: block; font-size: 1.8rem; color: var(--primary); }
.stat-card span { color: var(--muted); margin-top: 0.5rem; display: block; }
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 2rem; }
.process-grid--blue .process-step { background: #fff; border-left: 4px solid var(--blue); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); text-align: center; }
.process-step { background: #fff; border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); text-align: center; }
.process-step h3 { margin: 1rem 0 0.5rem; font-size: 1.1rem; }
.process-step p { color: var(--muted); line-height: 1.6; }
.process-step .card-icon { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto; border-radius: 50%; background: rgba(37,99,235,0.12); color: var(--primary); font-weight: 700; }
.trust-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.trust-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.trust-card { background: #fff; border: 1px solid rgba(37,99,235,0.16); border-radius: var(--radius); padding: 1.3rem 1.2rem; box-shadow: var(--shadow); text-align: center; }
.trust-card-number { display: block; font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 0.5rem; }
.trust-card p { margin: 0; color: var(--muted); line-height: 1.6; }
.partner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; align-items: center; justify-items: center; margin-top: 0; }
.partner-grid--modern { margin: 0; }
.partner-logo { width: 100%; max-width: 160px; height: 80px; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: rgba(37,99,235,0.08); box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04); color: var(--ink); font-weight: 700; text-transform: uppercase; font-size: 0.95rem; padding: 0.9rem; border: 1px solid rgba(37,99,235,0.12); }
.partner-quote { max-width: 100%; margin: 1.5rem 0 0; color: var(--muted); font-style: italic; background: #fff; border: 1px solid rgba(37,99,235,0.16); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.partner-quote strong { color: var(--ink); font-style: normal; display: block; margin-bottom: 0.75rem; font-size: 1.05rem; }
.partner-quote p { margin: 0; }
@media (max-width: 860px) {
    .trust-panel { grid-template-columns: 1fr; }
    .trust-summary { grid-template-columns: 1fr; }
}

/* Project cards */
.project-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.project-thumb { height: 140px; max-height: 160px; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 400; color: #fff; background: var(--grey); overflow: hidden; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-thumb.statut-en_cours { background: var(--blue); }
.project-thumb.statut-termine { background: var(--green); }
.project-thumb.statut-arret { background: var(--red); }
.project-body { padding: 1rem 1rem 0.9rem; }
.project-body h3 { margin: .1rem 0 .4rem; font-size: 1.05rem; }
.project-body p { margin-bottom: 0.8rem; }

/* Badges */
.badge { display: inline-block; padding: .2rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #fff; }
.badge-en_cours, .badge-en_attente { background: var(--blue); }
.badge-termine, .badge-approuvee { background: var(--green); }
.badge-arret, .badge-rejetee { background: var(--red); }

/* CTA band */
.cta-band { background: var(--ink); color: #fff; padding: 3.5rem 0; text-align: center; }
.cta-band h2 { margin: 0 0 .5rem; font-size: 1.9rem; }
.cta-inner p { opacity: .85; margin-bottom: 1.5rem; }

/* Filters */
.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filter { padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 500; }
.filter.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.toolbar-left { min-width: 220px; }
.toolbar-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.search-form { display: flex; align-items: center; gap: 0.5rem; }
.search-form .form-control { min-width: 240px; }
.actions-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.sortable { color: var(--ink); font-weight: 600; }
.sortable:hover { color: var(--primary); }
.pagination-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.pagination-summary { color: var(--muted); font-size: 0.95rem; }
.pagination-actions { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.pagination-current { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 0.45rem 0.75rem; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 700; }
.ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 0.45rem 0.75rem; color: var(--muted); }

/* Forms */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-bottom: 1.5rem; }
.form-group { display: flex; flex-direction: column; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-weight: 600; margin-bottom: .35rem; font-size: .92rem; }
.form-control, .form-group input, .form-group select, .form-group textarea, .login-card input {
    width: 100%; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 8px;
    font-size: .95rem; font-family: inherit; background: #fff;
}
.form-control:focus, input:focus, select:focus, textarea:focus { outline: 2px solid rgba(37,99,235,.25); border-color: var(--primary); }
.form-check-input { width: auto; }
.help { color: var(--muted); font-size: .8rem; margin-top: .25rem; }
.error { color: var(--red); font-size: .82rem; margin-top: .25rem; }

/* Alerts */
.messages { margin: 1.2rem auto; }
.alert { padding: .9rem 1.1rem; border-radius: 8px; margin-bottom: .8rem; }
.alert-success { background: #e6f6ec; color: #14723b; border: 1px solid #b6e3c6; }
.alert-error, .alert-danger { background: #fdeaea; color: #a12626; border: 1px solid #f3c2c2; }
.alert-info { background: #e8f0fe; color: #1b4ea1; border: 1px solid #c2d6f5; }

/* Footer */
.site-footer { background: var(--ink); color: #cbd2da; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding: 3rem 0; }
.site-footer h3, .site-footer h4 { color: #fff; }
.site-footer a { display: block; color: #cbd2da; margin-bottom: .4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1rem 0; font-size: .85rem; }

/* Project detail */
.project-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.project-detail-img img { width: 100%; border-radius: var(--radius); }
.meta-list { list-style: none; padding: 0; margin: 1.2rem 0; }
.meta-list li { padding: .4rem 0; border-bottom: 1px dashed var(--line); }
.back-link { display: inline-block; margin-bottom: 1rem; }

/* ----------------- Gestion (admin) ----------------- */
.gestion-body { background: var(--bg); }
.gestion-layout { display: flex; min-height: 100vh; }
.sidebar { width: 250px; background: #156fc9; color: #cbd2da; display: flex; flex-direction: column; padding: 1.5rem 1rem; position: sticky; top: 0; height: 100vh; }
.sidebar-brand { margin-bottom: 2rem; }
.sidebar-brand .brand-rest { color: #fff; }
.sidebar .brand-tagline { color: #fff; }
.sidebar-nav { display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.sidebar-nav a { color: #cbd2da; padding: .65rem .9rem; border-radius: 8px; font-weight: 500; }
.sidebar-nav a:hover { background: #fff; text-decoration: none; }
.sidebar-nav a.active { background: var(--primary); color: #fff; }
.sidebar-logout { margin-top: 1rem; }

.gestion-main { flex: 1; padding: 1.5rem 2rem; min-width: 0; }
.gestion-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.gestion-topbar h1 { margin: 0; font-size: 1.6rem; }
.user-chip { background: #fff; border: 1px solid var(--line); padding: .4rem .9rem; border-radius: 999px; font-weight: 600; font-size: .85rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2rem; margin-bottom: 1.5rem; }
.stat-box { background: #fff; border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); border-left: 5px solid var(--grey); }
.stat-box-num { display: block; font-size: 2.2rem; font-weight: 800; }
.stat-box-label { color: var(--muted); font-size: .9rem; }
.accent-blue { border-left-color: var(--blue); }
.accent-green { border-left-color: var(--green); }
.accent-red { border-left-color: var(--red); }
.accent-grey { border-left-color: var(--grey); }
.block-title { margin: 1.5rem 0 1rem; font-size: 1.2rem; }

.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1.5rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.panel-head h2 { margin: 0; font-size: 1.2rem; }
.narrow-panel { max-width: 560px; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .8rem .6rem; border-bottom: 1px solid var(--line); font-size: .92rem; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: .75rem; letter-spacing: .04em; }
.table .actions { display: flex; gap: .4rem; }

.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; flex-wrap: wrap; gap: 1rem; }
.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: start; }
.confirm-actions { display: flex; gap: 1rem; margin-top: 1.5rem; }

/* Login */
.login-body { background: linear-gradient(135deg, #0f62b5); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.login-card { background: #fff; border-radius: 16px; padding: 2.5rem; width: min(420px, 100%); box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.login-card .brand { width: 100%; justify-content: center; }
.login-card h1 { margin: 1rem 0 .3rem; font-size: 1.5rem; }
.login-card .form-group { margin-bottom: 1rem; }
.login-card .btn-online { display: block; margin: 1rem auto 0; padding: 0.75rem 1.8rem; min-width: 180px; }

/* Responsive */
@media (max-width: 860px) {
    .nav-toggle-label { display: inline-block; cursor: pointer; padding: .5rem; }
    .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
        display: block; width: 24px; height: 2px; background: var(--ink); position: relative; content: ""; }
    .nav-toggle-label span::before { position: absolute; top: -7px; }
    .nav-toggle-label span::after { position: absolute; top: 7px; }
    .main-nav { display: none; flex-direction: column; width: 100%; align-items: flex-start; gap: .6rem; padding-top: 1rem; }
    .nav-toggle:checked ~ .main-nav { display: flex; }
    .header-inner { flex-wrap: wrap; }
    .form-grid { grid-template-columns: 1fr; }
    .project-detail, .detail-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; width: 100%; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
    .sidebar-nav { flex-direction: row; flex-wrap: wrap; }
    .gestion-layout { flex-direction: column; }
    .hero-text h1 { font-size: 2rem; }
}

/* 1. Supprimer les puces de la liste et les marges par défaut */
.contact-info {
    list-style: none; /* Enlève les petits points */
    padding: 0;       /* Supprime le décalage à gauche */
    margin: 0;
}

/* 2. Assurer que chaque ligne est bien propre */
.contact-info li {
    margin-bottom: 10px; /* Espace entre chaque ligne de contact */
    display: flex;       /* Aligne l'icône et le texte sur la même ligne */
    align-items: center; /* Centre verticalement l'icône et le texte */
    text-align: left;    /* Force le texte à rester bien à gauche */
    line-height: 1.5;    /* Améliore la lisibilité */
}

/* 3. Ajustement pour les liens (pour qu'ils restent bien alignés) */
.contact-info li a {
    color: inherit;      /* Garde la couleur de votre texte de footer */
    text-decoration: none;
    margin-left: 8px;    /* Petit espace entre l'icône et le lien */
}

.contact-info li a:hover {
    text-decoration: underline; /* Petit effet au survol */
}

.social-links {
    display: flex !important;       /* Force le mode ligne */
    flex-direction: row !important; /* Force l'alignement horizontal */
    justify-content: center;        /* Centre les icônes */
    align-items: center;            /* Aligne verticalement au centre */
    gap: 1.5rem;                    /* Espace entre les icônes */
}

/* On s'assure que les liens ne se comportent pas comme des blocs */
.social-links a {
    display: inline-block !important;
}

.trust-section {
    padding: 40px 20px;
    background-color: #fff;
}

/* Style du titre avec les lignes */
.trust-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.trust-header h2 {
    font-size: 14px;
    letter-spacing: 2px;
    color: #333;
    text-transform: uppercase;
    font-weight: 600;
}

.line {
    height: 1px;
    width: 60px;
    background-color: #999;
}

/* Grille pour les 8 partenaires */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 30px;
    align-items: center;
    text-align: center;
    color: #777; /* Gris sobre comme sur votre image */
    font-weight: bold;
}

/* Responsivité */
@media (max-width: 1024px) {
    .partner-grid { grid-template-columns: repeat(4, 1fr); gap: 40px; }
}
@media (max-width: 600px) {
    .partner-grid { grid-template-columns: repeat(2, 1fr); }
}