/**
 * I-DPE - Styles principaux
 * Design professionnel et élégant
 */

/* ============================================
   Variables CSS
   ============================================ */
:root {
    /* Couleurs principales */
    --primary: #1e3a5f;
    --primary-light: #2d5a8a;
    --primary-dark: #0f2340;
    --secondary: #c9a227;
    --secondary-light: #e0b93d;

    /* Couleurs neutres */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Couleurs fonctionnelles */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;

    /* Typographie */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;

    /* Espacements */
    --section-padding: 100px;
    --section-padding-mobile: 60px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Border radius */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-700);
    background-color: var(--white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-light);
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--gray-600);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.75rem;
}

.brand-text {
    color: var(--primary);
    font-family: var(--font-sans);
    font-weight: 300;
    letter-spacing: -0.5px;
}

.brand-text strong {
    font-weight: 700;
}

.navbar.scrolled .brand-text,
.navbar-dark .brand-text {
    color: var(--primary);
}

.navbar-nav .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-700);
    padding: 0.5rem 1.25rem !important;
    position: relative;
    transition: color var(--transition-fast);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.25rem;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width var(--transition-normal);
}

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

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: calc(100% - 2.5rem);
}

.navbar-nav .btn-contact {
    background: var(--primary);
    color: var(--white) !important;
    border-radius: var(--radius);
    margin-left: 0.5rem;
}

.navbar-nav .btn-contact:hover {
    background: var(--primary-light);
}

.navbar-nav .btn-contact::after {
    display: none;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%231e3a5f' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   Hero Sections
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero .lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.35rem;
    max-width: 600px;
}

.hero-decoration {
    position: absolute;
    right: -10%;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    height: 80%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.03) 30%, rgba(255,255,255,0.03) 70%, transparent 70%);
    z-index: 1;
}

/* Page hero (smaller) */
.hero-page {
    min-height: 50vh;
    padding-top: 120px;
}

.hero-page h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    font-weight: 500;
    padding: 0.875rem 2rem;
    border-radius: var(--radius);
    transition: all var(--transition-normal);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

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

.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--gray-900);
}

.btn-secondary:hover {
    background: var(--secondary-light);
    border-color: var(--secondary-light);
    color: var(--gray-900);
    transform: translateY(-2px);
}

.btn-outline-light {
    border-width: 2px;
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

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

/* ============================================
   Sections
   ============================================ */
section {
    padding: var(--section-padding) 0;
}

@media (max-width: 768px) {
    section {
        padding: var(--section-padding-mobile) 0;
    }
}

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

.section-header .subtitle {
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: block;
}

.section-header p {
    color: var(--gray-600);
    font-size: 1.125rem;
}

.bg-light {
    background-color: var(--gray-50) !important;
}

/* ============================================
   Cards
   ============================================ */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: all var(--transition-normal);
    overflow: hidden;
}

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

.card-body {
    padding: 2rem;
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 2.5rem 2rem;
    height: 100%;
}

.feature-card .icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.75rem;
    transition: transform var(--transition-normal);
}

.feature-card:hover .icon {
    transform: scale(1.1);
}

.feature-card h4 {
    font-family: var(--font-sans);
    font-weight: 600;
    margin-bottom: 1rem;
    white-space: nowrap;
}

.feature-card p {
    color: var(--gray-600);
    margin-bottom: 0;
}

/* Expertise Cards */
.expertise-card {
    position: relative;
    padding: 2.5rem;
    height: 100%;
    border-left: 4px solid var(--secondary);
}

.expertise-card .number {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 3rem;
    font-weight: 700;
    color: var(--gray-100);
    line-height: 1;
}

.expertise-card h4 {
    color: var(--primary);
    font-family: var(--font-sans);
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.expertise-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.expertise-card ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--gray-600);
}

.expertise-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1rem;
    width: 6px;
    height: 6px;
    background: var(--secondary);
    border-radius: 50%;
}

/* ============================================
   About Section
   ============================================ */
.about-content {
    padding: 2rem 0;
}

.about-content h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.about-list {
    list-style: none;
    padding: 0;
}

.about-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
}

.about-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--secondary);
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--secondary);
    border-radius: var(--radius-lg);
    z-index: -1;
}

/* ============================================
   Team Section
   ============================================ */
.team-card {
    text-align: center;
    padding: 3rem 2rem;
}

.team-card .avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--gray-500);
}

.team-card h4 {
    font-family: var(--font-sans);
    margin-bottom: 0.5rem;
}

.team-card .role {
    color: var(--secondary);
    font-weight: 500;
    margin-bottom: 1rem;
    display: block;
}

.team-card p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* ============================================
   Contact Section
   ============================================ */
.contact-info {
    background: var(--primary);
    color: var(--white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    height: 100%;
}

.contact-info h3 {
    color: var(--white);
    margin-bottom: 2rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-info-item i {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-info-item h5 {
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-info-item p,
.contact-info-item a {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

.contact-info-item a:hover {
    color: var(--white);
}

.contact-form {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.contact-form h3 {
    margin-bottom: 2rem;
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    padding: 0.875rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

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

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

/* Alert messages */
.alert {
    border-radius: var(--radius);
    border: none;
    padding: 1rem 1.25rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

/* ============================================
   Legal Page
   ============================================ */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-100);
}

.legal-content h2:first-of-type {
    margin-top: 0;
}

.legal-content ul {
    list-style: none;
    padding: 0;
    background: var(--gray-50);
    padding: 1.5rem 2rem;
    border-radius: var(--radius);
}

.legal-content ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.legal-content ul li:last-child {
    border-bottom: none;
}

.legal-content ul li strong {
    color: var(--gray-700);
    min-width: 200px;
    display: inline-block;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 5rem 0 2rem;
}

.footer-brand {
    margin-bottom: 1.5rem;
}

.footer-brand .brand-text {
    font-size: 2rem;
    color: var(--white);
}

.footer-description {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    color: var(--secondary);
    font-style: italic;
}

.footer-title {
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.footer-contact li i {
    width: 20px;
    margin-right: 1rem;
    color: var(--secondary);
    margin-top: 0.25rem;
}

.footer-contact a {
    color: var(--gray-400);
}

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

.footer-divider {
    border-color: var(--gray-800);
    margin: 3rem 0 1.5rem;
}

.footer-bottom {
    font-size: 0.875rem;
}

.copyright {
    margin-bottom: 0;
}

.footer-legal-link {
    color: var(--gray-400);
}

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

.footer-separator {
    margin: 0 0.75rem;
    color: var(--gray-700);
}

.footer-credits a {
    color: var(--secondary);
}

.footer-credits a:hover {
    color: var(--secondary-light);
}

/* ============================================
   Back to Top Button
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.back-to-top:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ============================================
   Stats Section
   ============================================ */
.stats-section {
    background: var(--primary);
    color: var(--white);
}

.stat-item {
    text-align: center;
    padding: 2rem;
}

.stat-item .number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-item .label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* ============================================
   Values Section
   ============================================ */
.value-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.value-item .icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.value-item h4 {
    font-family: var(--font-sans);
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.value-item p {
    color: var(--gray-600);
    margin-bottom: 0;
}

/* ============================================
   Timeline
   ============================================ */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: var(--secondary);
    border: 4px solid var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow);
    z-index: 1;
}

.timeline-content {
    width: 45%;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: auto;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-item::before {
        left: 20px;
    }

    .timeline-content {
        width: calc(100% - 50px);
        margin-left: 50px !important;
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--white);
        padding: 1.5rem;
        margin-top: 1rem;
        border-radius: var(--radius);
        box-shadow: var(--shadow-lg);
    }

    .navbar-nav .nav-link::after {
        display: none;
    }

    .navbar-nav .btn-contact {
        margin-left: 0;
        margin-top: 0.5rem;
        display: inline-block;
        width: auto;
    }

    .hero-decoration {
        display: none;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .feature-card {
        padding: 2rem 1rem;
    }

    .feature-card h4 {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .contact-info,
    .contact-form {
        padding: 2rem;
    }

    .about-image::before {
        display: none;
    }

    .stat-item .number {
        font-size: 2.5rem;
    }

    .feature-card {
        padding: 2rem 1rem;
    }

    .feature-card h4 {
        font-size: 1rem;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }

.mb-6 { margin-bottom: 4rem !important; }
.mt-6 { margin-top: 4rem !important; }
.py-6 { padding-top: 4rem !important; padding-bottom: 4rem !important; }

/* Loading animation for form */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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