/* ===================== */
/* RESET ET VARIABLES */
/* ===================== */

:root {
    --primary-color: #0066cc;
    --primary-dark: #004fa3;
    --secondary-color: #00d4ff;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --dark-text: #1f2937;
    --gray-text: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--white);
}

body.form-page {
    position: relative;
    min-height: 100vh;
    background-image: url('poli.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #ffffff;
}

body.form-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('cani.avif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.22;
    z-index: -2;
}

body.form-page::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: -1;
}

/* ===================== */
/* UTILITAIRES */
/* ===================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark-text);
    font-weight: 700;
}

/* ===================== */
/* BOUTONS */
/* ===================== */

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

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

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-secondary {
    background-color: var(--light-bg);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* ===================== */
/* HEADER ET NAVIGATION */
/* ===================== */

.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-placeholder {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    font-size: 2.5rem;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.company-name {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    margin: 0;
}

.company-tagline {
    font-size: 0.85rem;
    color: var(--gray-text);
    margin: 0;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.btn-apply {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
    padding: 10px 20px !important;
    border-radius: 6px;
    font-weight: 600 !important;
}

.btn-apply:hover {
    background-color: var(--primary-dark) !important;
}

/* ===================== */
/* HERO SECTION */
/* ===================== */

.hero {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.75), rgba(0, 79, 163, 0.75)), url('arriere.avif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 120px 20px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.95;
}

/* ===================== */
/* À PROPOS SECTION */
/* ===================== */

.about {
    padding: 80px 20px;
    background-color: var(--light-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-text p {
    color: var(--gray-text);
    line-height: 1.8;
    margin-bottom: 15px;
}

.about-right {
    display: grid;
    gap: 30px;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-image img {
    width: 100%;
    height: auto;
    max-width: 520px;
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.stat-label {
    color: var(--gray-text);
    font-weight: 500;
}

/* ===================== */
/* PORTFOLIO SECTION */
/* ===================== */

.portfolio {
    padding: 80px 20px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.portfolio-header h3 {
    font-size: 1.3rem;
    color: var(--dark-text);
    margin: 0;
}

.badge {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.portfolio-description {
    color: var(--gray-text);
    margin-bottom: 20px;
    line-height: 1.6;
}

.portfolio-details {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.detail-item .label {
    color: var(--gray-text);
    font-weight: 500;
}

.detail-item .value {
    color: var(--dark-text);
    font-weight: 600;
}

.detail-item .success {
    color: var(--success-color);
}

/* ===================== */
/* CTA SECTION */
/* ===================== */

.cta {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.95;
}

/* ===================== */
/* PAGE FORMULAIRE */
/* ===================== */

body.form-page {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.85), rgba(0, 79, 163, 0.85)), url('videoframe.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

body.form-page main {
    padding: 40px 20px 60px;
}

/* ===================== */
/* FORMULAIRE */
/* ===================== */

.form-container {
    max-width: 600px;
    margin: 60px auto;
    padding: 50px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

/* Images poli en haut et cani en bas du formulaire */
.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: url('poli.jpg') center top / cover no-repeat;
    z-index: 0;
    border-radius: 20px 20px 0 0;
    opacity: 0.7;
}

.form-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: url('cani.avif') center bottom / cover no-repeat;
    z-index: 0;
    border-radius: 0 0 20px 20px;
    opacity: 0.7;
}

/* Z-index pour les contenus internes */
.form-container > * {
    position: relative;
    z-index: 1;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h2 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-weight: 700;
}

.form-header p {
    color: var(--primary-color);
    font-weight: 500;
}

fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

legend {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 25px;
    display: block;
    width: 100%;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 102, 204, 0.15);
}

legend:first-of-type {
    margin-top: 0;
}

.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 13px;
    border: 2px solid rgba(0, 102, 204, 0.15);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

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

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--gray-text);
    font-size: 0.9rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.form-actions button {
    flex: 1;
}

.btn-submit {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: var(--white);
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.05rem;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #059669, var(--success-color));
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.2);
    color: var(--primary-color);
    padding: 15px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.btn-cancel:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 102, 204, 0.3);
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border: none;
    border-radius: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

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

.edit-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 20px 0 10px;
}

.edit-toggle input {
    width: 20px;
    height: 20px;
}

.edit-coordonnees-section {
    background-color: rgba(0, 102, 204, 0.05);
    border: 1px solid rgba(0, 102, 204, 0.15);
    border-radius: 14px;
    padding: 20px;
    margin-top: 15px;
}

.edit-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.edit-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(0, 102, 204, 0.2);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--dark-text);
}

.edit-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    outline: none;
}

.edit-confirmation {
    margin-top: 12px;
    color: #065f46;
    font-weight: 700;
}

.required {
    color: var(--danger-color);
}

/* ===================== */
/* MESSAGE DE SUCCÈS */
/* ===================== */

.success-message {
    background-color: #d1fae5;
    border: 1px solid var(--success-color);
    color: #065f46;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.error-message {
    background-color: #fee2e2;
    border: 1px solid var(--danger-color);
    color: #991b1b;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.info-message {
    background-color: #dbeafe;
    border: 1px solid var(--primary-color);
    color: #1e40af;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* ===================== */
/* FOOTER */
/* ===================== */

.footer {
    background-color: var(--dark-text);
    color: var(--white);
    padding: 80px 20px 30px;
    margin-top: 80px;
    background-image: linear-gradient(rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.95)), url('cani.avif'), url('poli.jpg');
    background-size: cover, 40%, 30%;
    background-position: center center, right bottom, left bottom;
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-blend-mode: overlay;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* ===================== */
/* SUSPENSION SECTION */
/* ===================== */

.suspension-section {
    padding: 80px 20px;
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
}

.suspension-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    align-items: start;
}

.letter-content {
    background-color: var(--light-bg);
    padding: 40px;
    border-radius: 10px;
    line-height: 1.8;
}

.letter-content p {
    color: var(--gray-text);
    margin-bottom: 20px;
    text-align: justify;
}

.letter-content p:first-child {
    font-weight: 600;
    color: var(--dark-text);
}

.letter-content h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 30px;
    margin-bottom: 15px;
}

.payment-list {
    list-style: none;
    background-color: var(--white);
    padding: 20px 30px;
    border-left: 4px solid var(--primary-color);
    margin: 20px 0;
    border-radius: 6px;
}

.payment-list li {
    padding: 10px 0;
    color: var(--dark-text);
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}

.payment-list li:last-child {
    border-bottom: none;
}

.payment-form-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    height: fit-content;
}

.payment-form-section h3 {
    color: var(--white);
    font-size: 1.4rem;
    margin-bottom: 30px;
}

.payment-form-section .btn {
    width: 100%;
    margin-top: 20px;
}

/* ===================== */
/* RESPONSIVE */
/* ===================== */

/* Coverage & profile carousel */
.coverage {
    padding: 60px 20px;
    background-color: var(--light-bg);
}
.coverage-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}
.coverage-cards .coverage-card {
    background-color: var(--white);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}
.coverage-right .profile-box {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    box-shadow: var(--shadow);
}
.profile-carousel {
    position: relative;
    height: 360px;
    overflow: hidden;
}
.profile-item {
    position: absolute;
    inset: 0;
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.profile-item.active {
    opacity: 1;
    transform: translateY(0);
}
.profile-item img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    border: 2px solid rgba(0,0,0,0.04);
}
.profile-content h4 {
    margin: 0 0 8px 0;
    color: var(--primary-color);
}
.profile-content p {
    color: var(--gray-text);
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 900px) {
    .coverage-grid {
        grid-template-columns: 1fr;
    }
    .profile-carousel { height: auto; position: static; }
    .profile-item { position: relative; opacity: 1; transform: none; margin-bottom: 12px; }
    .profile-item img { width: 80px; height: 80px; }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .header .container {
        flex-direction: column;
        gap: 20px;
    }

    .nav ul {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .suspension-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cta h2 {
        font-size: 1.8rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .form-container {
        padding: 20px;
    }

    .btn-large {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }
}
