/* Home page (public) — styles extracted from templates/utilisateurs/home.html
   Objectif: réduire le CSS inline et garder la home “institutionnelle”.
*/

/* Masquer le sidebar sur la page home */
body.home-page .main-layout {
    display: block !important;
}

body.home-page .sidebar {
    display: none !important;
}

body.home-page .main-content {
    max-width: 100% !important;
    padding: 0 !important;
}

/* Hero Section - Moderne avec image de fond */
.hero-section {
    background:
        linear-gradient(135deg, rgba(17, 43, 72, 0.95) 0%, rgba(10, 31, 53, 0.98) 100%),
        url('/static/images/image_port.jpeg') center/cover no-repeat;
    color: var(--white);
    padding: 4rem 2rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-block;
    background: rgba(178, 70, 26, 0.2);
    border: 1px solid rgba(178, 70, 26, 0.4);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    opacity: 0.95;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.hero-description {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 300;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.btn-primary-large {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    background: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(178, 70, 26, 0.3);
}

.btn-primary-large:hover {
    background: #9e3c15;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(178, 70, 26, 0.4);
}

.btn-secondary-large {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-secondary-large:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Stats Section */
.stats-section {
    background: var(--white);
    padding: 2.5rem 2rem;
    margin-top: -2rem;
    position: relative;
    z-index: 2;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    align-items: stretch;
    width: 100%;
}

.stat-card {
    width: 100%;
    min-width: 0; /* Permet au contenu de se rétrécir si nécessaire */
}

@media (max-width: 1024px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .stats-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(17, 43, 72, 0.1);
}

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

.stat-icon {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 0.75rem;
}

.stat-number {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--neutral);
    font-weight: 500;
    line-height: 1.4;
}

/* Services Section */
.services-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 2rem;
}

.section-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 2.5rem;
}

.section-badge {
    display: inline-block;
    background: rgba(178, 70, 26, 0.1);
    color: var(--secondary);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.section-description {
    font-size: 1rem;
    color: var(--neutral);
    line-height: 1.7;
}

.services-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: min-content;
    grid-auto-flow: dense;
    gap: 2rem;
    align-items: stretch;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-top: 4px solid var(--secondary);
}

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

.service-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.service-title {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.service-description {
    color: var(--neutral);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Features Section */
.features-section {
    background: var(--white);
    padding: 4rem 2rem;
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: min-content;
    grid-auto-flow: dense;
    gap: 2rem;
    align-items: stretch;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.feature-icon {
    font-size: 1.75rem;
    color: var(--secondary);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.feature-content h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.feature-content p {
    color: var(--neutral);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Compliance Section */
.compliance-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 3.5rem 2rem;
}

.compliance-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: start;
}

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

.compliance-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(17, 43, 72, 0.08);
    padding: 1.75rem;
}

.compliance-list {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--neutral);
    line-height: 1.7;
}

.compliance-list li {
    margin-bottom: 0.5rem;
}

.compliance-mini {
    display: grid;
    gap: 1rem;
}

.compliance-mini .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    background: rgba(17, 43, 72, 0.06);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Process Section */
.process-section {
    background: linear-gradient(135deg, var(--primary) 0%, #0a1f35 100%);
    color: var(--white);
    padding: 4rem 2rem;
    position: relative;
}

.process-section .section-title {
    color: var(--white);
}

.process-section .section-description {
    color: rgba(255, 255, 255, 0.9);
}

.process-timeline {
    max-width: 1000px;
    margin: 2.5rem auto 0;
    position: relative;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-50%);
}

.process-item {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

.process-item:nth-child(odd) {
    flex-direction: row;
}

.process-item:nth-child(even) {
    flex-direction: row-reverse;
}

.process-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.process-item:nth-child(odd) .process-content {
    margin-right: 1.5rem;
}

.process-item:nth-child(even) .process-content {
    margin-left: 1.5rem;
}

.process-number {
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(178, 70, 26, 0.4);
}

.process-title {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.process-description {
    opacity: 0.9;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--secondary) 0%, #9e3c15 100%);
    color: var(--white);
    padding: 3.5rem 2rem;
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.cta-description {
    font-size: 1.05rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 968px) {
    .hero-section {
        min-height: 50vh;
        padding: 3rem 1.5rem 2rem;
    }

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

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .process-timeline::before {
        left: 30px;
    }

    .process-item {
        flex-direction: row !important;
        padding-left: 4rem;
    }

    .process-item .process-content {
        margin: 0 !important;
    }

    .process-number {
        position: absolute;
        left: 0;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 1.5rem 2rem;
        min-height: 50vh;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
        margin-top: 1rem;
    }

    .btn-primary-large,
    .btn-secondary-large {
        width: 100%;
        justify-content: center;
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }

    .stats-section {
        padding: 2rem 1.5rem;
        margin-top: -1.5rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-icon {
        font-size: 1.75rem;
    }

    .stat-number {
        font-size: 1.05rem;
    }

    .services-section,
    .features-section,
    .process-section,
    .cta-section,
    .compliance-section {
        padding: 3rem 1.5rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-description {
        font-size: 0.95rem;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-icon {
        font-size: 2rem;
    }

    .cta-title {
        font-size: 1.5rem;
    }

    .cta-description {
        font-size: 1rem;
    }
}
