/* ============================================
   COMPONENTS STYLES - Buttons, Cards, Forms
   ============================================ */

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    opacity: 0.9;
}

.btn-secondary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

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

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    -webkit-backdrop-filter: saturate(120%) blur(2px);
    backdrop-filter: saturate(120%) blur(2px);
}

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

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

/* Project Cards */
.project-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

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

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.project-card h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.project-card h3 .card-subtitle {
    color: var(--text-light);
    font-weight: 400;
}

.project-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex: 1;
}

.project-card .btn {
    margin-top: auto;
    font-weight: 500;
}

/* Details Sections */
.details-container {
    background: var(--light-bg);
    border-radius: 10px;
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* Promise Section */
.promise-feature {
    position: relative;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.promise-feature::before {
    content: '';
    position: absolute;
    inset: 0;
    border-left: 4px solid var(--primary-color);
    pointer-events: none;
}

.promise-feature__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1060px;
    margin: 0 auto;
}

.promise-feature__intro {
    display: grid;
    gap: 0.85rem;
}

.promise-feature__badge {
    margin: 0;
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    background: var(--light-bg);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.promise-feature__lead {
    margin: 0;
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.65;
    font-size: 1.1rem;
}

.promise-feature__content {
    display: grid;
    gap: 1rem;
}

.promise-feature__card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem 1.25rem;
}

.promise-feature__card p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.75;
    font-weight: 600;
}

.promise-feature__card--accent {
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.promise-feature__card--accent p {
    color: var(--text-dark);
}

@media (min-width: 900px) {
    .promise-feature__inner {
        grid-template-columns: 0.95fr 1.05fr;
        gap: 2.25rem;
        align-items: start;
    }
    .promise-feature__content {
        gap: 1.15rem;
    }
}

/* Services Section */
.services-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin: 1.25rem 0 2rem;
}

.services-nav-link {
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.95rem;
}

.service-panel {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    padding: 2rem;
    border-left: 4px solid var(--primary-color);
    margin-top: 1rem;
    scroll-margin-top: 90px;
    --service-max-height: 2400px;
    max-height: var(--service-max-height);
    overflow: hidden;
    transition:
        max-height 320ms ease,
        opacity 220ms ease,
        transform 220ms ease,
        padding 220ms ease,
        border-width 220ms ease,
        margin-top 220ms ease;
    will-change: max-height, opacity, transform;
}

.service-panel:not(.is-collapsed) {
    animation: fadeIn 0.35s ease;
}

.service-panel.is-collapsed {
    max-height: 0;
    opacity: 0;
    transform: translateY(6px);
    padding: 0;
    border-width: 0;
    margin-top: 0;
    pointer-events: none;
}

.service-title {
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
    font-weight: 700;
}

.service-subtitle {
    margin: 0 0 1.25rem 0;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.1rem;
}

.service-copy {
    max-width: 75ch;
}

.service-copy p {
    color: var(--text-light);
    font-weight: 500;
    line-height: 1.8;
    margin: 0 0 0.9rem;
}

.service-copy p:last-child {
    margin-bottom: 0;
}

.service-copy .summary-list {
    margin-top: 0.6rem;
}

.service-copy .summary-list li {
    margin: 0.4rem 0;
}

.service-minihead {
    margin: 1.25rem 0 0.75rem;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1rem;
    padding-left: 0.75rem;
    border-left: 3px solid var(--primary-color);
}

.service-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 0.75rem 0 1rem;
}

.service-column {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.1rem 1.1rem;
}

.service-column .service-minihead {
    margin-top: 0;
}

@media (min-width: 900px) {
    .service-columns {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: start;
    }
}

.detail-section {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
    --detail-max-height: 2000px;
    max-height: var(--detail-max-height);
    overflow: hidden;
    transition:
        max-height 320ms ease,
        opacity 220ms ease,
        transform 220ms ease,
        padding 220ms ease,
        border-width 220ms ease;
    will-change: max-height, opacity, transform;
}

/* When multiple detail sections are in the flow (no wrapper), keep comfortable spacing */
.detail-section + .detail-section {
    margin-top: 1rem;
}

.detail-section:not(.is-collapsed) {
    animation: fadeIn 0.35s ease;
}

.detail-section.is-collapsed {
    max-height: 0;
    opacity: 0;
    transform: translateY(6px);
    padding-top: 0;
    padding-bottom: 0;
    border-top-width: 0;
    border-right-width: 0;
    border-bottom-width: 0;
    border-left-width: 0;
    pointer-events: none;
}

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

.detail-section h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    line-height: 1.2;
}

.detail-section p {
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.detail-section p:last-child {
    margin-bottom: 0;
}

.detail-section ul:not(.summary-list),
.detail-section ol {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.detail-section ul:not(.summary-list) li,
.detail-section ol li {
    line-height: 1.6;
    margin: 0.25rem 0;
}

.feature-list {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    color: var(--text-dark);
    font-weight: 500;
}

/* Compact summary list for details sections */
.summary-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    max-width: 900px;
}

.summary-list li {
    position: relative;
    padding-left: 26px;
    margin: 0.35rem 0;
    color: var(--text-dark);
    line-height: 1.6;
}

.summary-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    font-weight: 700;
}

/* Descriptif layout */
.descriptif-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 1.5rem;
    align-items: start;
}

.descriptif-content {
    max-width: 75ch;
}

.descriptif-content p {
    margin: 0 0 0.9rem;
}

.descriptif-content p:last-child {
    margin-bottom: 0;
}

.descriptif-lead {
    color: var(--text-dark);
    font-weight: 600;
}

.descriptif-closing {
    margin-top: 0.25rem;
}

.descriptif-highlights {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.descriptif-kicker {
    margin: 0;
    color: var(--text-dark);
    font-weight: 600;
}

.descriptif-highlights .summary-list {
    margin-top: 0.75rem;
}

/* Scroll reveal (enabled only when JS adds .js on <html>) */
.js .descriptif-reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 420ms ease, transform 420ms ease;
}

.js .descriptif-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.js .descriptif-highlights.descriptif-reveal {
    transition-delay: 120ms;
}

.objectives-list {
    list-style: decimal;
    margin-left: 2rem;
}

.objectives-list li {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

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

.stat-label {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.team-member {
    text-align: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.team-member:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.member-avatar {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.team-member h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.team-member p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Document Card */
.document-container {
    max-width: 600px;
    margin: 0 auto;
}

.document-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.document-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.document-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.document-info h3 {
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.document-type {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

.document-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.document-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Contact Form */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

/* Contact (simple card layout used on index.html) */
.contact-card-shell {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.contact-card-title {
    margin-top: 0;
    color: var(--primary-color);
}

.contact-card-note {
    color: var(--text-light);
    margin-top: 0.75rem;
}

.contact-form {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

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

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    display: none;
    font-weight: 500;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Contact Info */
.contact-info {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 10px;
    height: fit-content;
}

.contact-info h3 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.info-content {
    color: var(--text-light);
    margin: 0;
}

/* PDF Modal */
.pdf-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pdf-preview-modal.active {
    display: flex;
}

.pdf-preview-content {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.pdf-preview-content h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--light-bg);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background-color: var(--border-color);
}
