/* Case Studies (removed) */
/* ==========================================
   PAGES SPECIFIC STYLES
   ========================================== */

/* Amélioration Safari (évite le zoom automatique texte) */
html { -webkit-text-size-adjust: 100%; }

/* Legal/Privacy: readable content layout */
.content-section {
    padding: 60px 0 90px;
}

.legal-content {
    background: #fff;
    border: 1px solid var(--light-gray);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 2rem;
    max-width: 980px;
    margin: 0 auto;
}

.legal-content h2 {
    color: var(--secondary-dark);
    margin-top: 1.25rem;
    margin-bottom: .75rem;
}

.legal-content p,
.legal-content li {
    color: var(--text-light);
    line-height: 1.85;
}

.legal-content ul {
    padding-left: 1.1rem;
    margin: .25rem 0 1rem;
    list-style: disc;
}

.legal-content a {
    color: var(--primary-color);
    text-decoration: underline;
}
.legal-content a:hover { color: var(--secondary-green); }

/* Services: FAQ accordion (details/summary) */
.faq-item {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 0;
    margin: 0 0 1rem;
    overflow: hidden;
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 1.1rem 1.25rem;
    font-weight: 700;
    color: var(--secondary-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    flex: 0 0 auto;
}

.faq-item[open] summary::after {
    content: '–';
    background: var(--primary-color);
    color: var(--white);
}

.faq-item > div {
    padding: 0 1.25rem 1.2rem;
    color: var(--text-light);
    line-height: 1.85;
}

.faq-item[open] summary {
    border-bottom: 1px solid var(--light-gray);
    background: rgba(0, 0, 0, 0.01);
}

@media (max-width: 640px) {
    .faq-item summary {
        padding: 1rem;
    }
    .faq-item > div {
        padding: 0 1rem 1rem;
    }
    .faq-item summary::after {
        width: 30px;
        height: 30px;
        border-radius: 9px;
    }
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-green) 100%);
    color: var(--white);
    padding: 80px 0 60px;
    text-align: center;
}

/* Affiliations Section */
.affiliations-section {
    padding: 60px 0;
}

.affiliation-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 2rem;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 1.25rem;
    align-items: center;
    border: 1px solid var(--light-gray);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.affiliation-icon {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-color);
}

.affiliation-icon svg {
    width: 36px;
    height: 36px;
    stroke: var(--primary-color);
}

.affiliation-content h2 {
    margin: 0 0 0.25rem 0;
    color: var(--secondary-dark);
    font-size: 1.75rem;
}

.affiliation-content p {
    color: var(--text-light);
    margin: 0.25rem 0;
}

.affiliation-link {
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
}

.affiliation-link:hover {
    color: var(--white);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

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

@media (max-width: 640px) {
    .affiliation-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .affiliation-icon {
        width: 64px;
        height: 64px;
    }
}

.page-header h1 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ==========================================
   ABOUT PAGE
   ========================================== */

.about-section {
    padding: 80px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.about-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1s ease;
}

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

.about-image img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 5px solid white;
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
    transition: all 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    outline-color: var(--secondary-green);
}

.about-content h2 {
    color: var(--secondary-dark);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about-intro {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Affiliation inline (IA Pro Academy) */
.affiliation-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.affiliation-inline .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #f8f9fa;
    border: 1px solid var(--light-gray);
}

.affiliation-inline .icon svg {
    width: 14px;
    height: 14px;
    stroke: var(--primary-color);
}

.affiliation-inline-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.affiliation-inline-link:hover {
    color: var(--secondary-green);
    border-bottom-color: var(--secondary-green);
}

.about-details h3 {
    color: var(--secondary-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.about-details p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.values-list {
    list-style: none;
    margin-top: 1.5rem;
}

.values-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    color: var(--text-light);
    line-height: 1.6;
    transition: all 0.3s ease;
}

.values-list li:hover {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transform: translateX(5px);
}

.values-list svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.values-list strong {
    color: var(--primary-color);
}

/* Certifications Section */
.certifications-section {
    padding: 80px 0;
    background-color: var(--light-gray);
}

/* Media Section */
.media-section {
    padding: 80px 0 60px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
    margin-top: 1.75rem;
}

.media-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--light-gray);
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.media-thumb {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    background: #000; /* fond noir pour bandes si letterboxing */
}
/* Wrapper ratio 16:9 robuste (compatible Safari) */
.media-thumb::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 16:9 */
}

.media-thumb video,
.media-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain; /* éviter le recadrage des visages */
    object-position: center;
    pointer-events: none; /* laisse le clic à l'enveloppe pour ouvrir la modale, évite le player natif */
}

/* Prefer native aspect-ratio when supported (prevents layout glitches on some Safari/MacBook cases) */
@supports (aspect-ratio: 16 / 9) {
  .media-thumb {
    aspect-ratio: 16 / 9;
  }
  .media-thumb::before { content: none; }
}

.media-card h3 {
    margin: 0.85rem 0 0.35rem;
    color: var(--secondary-dark);
    font-size: 1.1rem;
    font-weight: 600;
}

.media-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* Espace sous la grille avant le bouton Voir plus */
.media-section .text-center {
    margin-top: 2.25rem; /* bouton un peu plus bas */
}

/* Titres de section pour cohérence visuelle */
.media-section .section-title {
    margin-bottom: 0.35rem;
}
.media-section .section-subtitle {
    color: var(--text-light);
}

/* Filtres médias */
.media-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .6rem;
    margin-top: 1rem;
    justify-content: center; /* centrer les filtres */
}
.media-filters .media-filter-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--light-gray);
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-dark);
}
.media-filters .media-filter-btn:hover,
.media-filters .media-filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Focus accessibilité */
.media-thumb:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 12px;
}

/* Bouton play sur la vignette */
.media-launch {
    padding: 0;
    border: none;
    background: transparent;
    width: 100%;
    cursor: pointer;
}

.media-thumb .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(transparent, rgba(0,0,0,0.18));
    opacity: 0;
    transition: opacity .2s ease;
}

.media-thumb .play-overlay .play-button {
    display: block;
    background: transparent; /* pas de rond */
    border: 0;
    padding: 0;
    font-size: 0; /* masque tout texte */
}

/* Icône play en CSS (triangle) */
.media-thumb .play-overlay .play-button::before {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 18px solid rgba(255,255,255,0.95); /* triangle plus fin, sans cercle */
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin-left: 3px; /* léger centrage visuel */
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.35));
    transition: transform .2s ease, opacity .2s ease;
}

/* Hover léger sur la vignette */
.media-thumb:hover .play-overlay { opacity: 1; }
.media-thumb:hover .play-overlay .play-button::before {
    transform: scale(1.06);
}

/* Hover carte média: léger lift et ombre */
.media-card {
    transition: transform .2s ease, box-shadow .2s ease;
}
.media-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Modale vidéo */
.media-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85); /* fond plus sombre pour mieux voir la vidéo */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2svh 1rem; /* espace haut/bas sur mobile, fallback plus bas */
    -webkit-overflow-scrolling: touch;
}

.media-modal.active { display: flex; }

.media-modal .modal-content {
    position: relative;
    width: min(96vw, 1280px); /* modal plus large sur desktop */
    max-height: 90svh;         /* éviter le dépassement vertical (unités dynamiques) */
    /* Fallback pour navigateurs sans svh */
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-lg);
}

.media-modal .modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 3;              /* au-dessus de la vidéo */
    pointer-events: auto;    /* s'assure que le clic est capté */
}

.media-modal video {
    display: block;
    width: auto;
    height: auto;
    max-width: 96vw;
    max-height: 82svh;  /* utilise la hauteur visible dynamique */
    /* Fallback */
    max-height: 82vh;
    object-fit: contain;
    background: #000;
    margin: 0 auto;
}

/* Lock background scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Ajustements responsive MacBook (≈1280px) */
@media (max-width: 1280px) {
    .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    .media-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
    .portfolio-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.75rem; }
}

/* Large laptop 1440px */
@media (max-width: 1440px) {
    .media-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .portfolio-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}

/* Tablet landscape 1024px */
@media (max-width: 1024px) {
    .media-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
    .portfolio-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
}

/* Tablet portrait 768px */
@media (max-width: 768px) {
    .media-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
    .portfolio-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* Small phones 640px */
@media (max-width: 640px) {
    .media-grid { grid-template-columns: 1fr; gap: 0.9rem; }
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    align-items: stretch; /* etirer les items pour avoir des hauteurs uniformes par ligne */
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

/* Guard rails (Safari/iOS/macOS): avoid overflow/gutters caused by grid min-content sizing */
.certifications-section,
.certifications-section * {
    box-sizing: border-box;
}

.certifications-section {
    overflow-x: clip;
}

@supports not (overflow: clip) {
    .certifications-section { overflow-x: hidden; }
}

.certifications-grid > * {
    min-width: 0;
}

.certifications-grid-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 2rem;
    justify-content: center;
    width: min(860px, 100%);
    margin: 0 auto;
}

.certifications-grid-row > * {
    min-width: 0;
}

.certifications-grid-row .certification-card {
    max-width: none;
}

@media (max-width: 1024px) {
    .certifications-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.5rem;
        max-width: 920px;
    }
    .certifications-grid-row {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
        gap: 1.5rem;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .certifications-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .certifications-grid-row {
        grid-template-columns: 1fr;
        width: 100%;
        gap: 1.25rem;
    }
    .certifications-grid-row .certification-card {
        max-width: none;
    }
}

.certification-card {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;              /* empile verticalement */
    flex-direction: column;
    height: 100%;               /* occupe toute la hauteur disponible de la cellule */
    box-sizing: border-box;
}

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

.cert-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.cert-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--primary-color);
    transition: all 0.3s ease;
}

.certification-card:hover .cert-icon {
    background: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.certification-card:hover .cert-icon svg {
    stroke: white;
    transform: scale(1.1);
}

.certification-card h3 {
    color: var(--secondary-dark);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.cert-organism {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.certification-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Certification images */
.cert-image {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

/* Pousser l'image en bas de la carte pour l'aligner entre cartes d'une même ligne */
.certification-card .cert-image {
    margin-top: auto;
}

.cert-image img {
    width: 100%;
    max-width: 520px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 2px solid var(--light-gray);
    /* Harmoniser le rendu des diplômes (souvent format paysage) */
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
}

.certification-card .cert-organism {
    color: var(--primary-color);
    font-weight: 600;
}

@media (max-width: 640px) {
    .cert-image img {
        max-width: 100%;
        aspect-ratio: 4 / 3;
    }
}

/* Skills Section */
.skills-section {
    padding: 80px 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.skill-category h3 {
    color: var(--secondary-dark);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.skill-tag:hover {
    background-color: var(--secondary-green);
    transform: translateY(-2px);
}

/* ==========================================
   SERVICES PAGE
   ========================================== */

.services-detail {
    padding: 80px 0;
}

.service-detail-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 4rem;
    padding: 3rem;
    background-color: var(--light-gray);
    border-radius: 20px;
    transition: var(--transition);
}

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

.service-detail-card.reverse {
    grid-template-columns: 1fr 150px;
}

.service-detail-card.reverse .service-detail-icon {
    order: 2;
}

.service-detail-card.reverse .service-detail-content {
    order: 1;
}

.service-detail-icon {
    width: 150px;
    height: 150px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.service-detail-icon svg {
    width: 64px;
    height: 64px;
    stroke: var(--primary-color);
    transition: transform 0.3s ease, stroke 0.3s ease;
}

.service-detail-card:hover .service-detail-icon {
    background: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.service-detail-card:hover .service-detail-icon svg {
    stroke: #fff;
    transform: scale(1.06);
}

.service-detail-content h2 {
    color: var(--secondary-dark);
    margin-bottom: 1rem;
}

/* Services: embedded PDFs inside cards */
.service-detail-content iframe {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    background: #fff;
}

/* Services: call-to-action link for formation PDF */
.service-detail-content a[type="application/pdf"],
.legal-content a[type="application/pdf"],
a.pdf-cta[type="application/pdf"] {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.1rem;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.service-detail-content a[type="application/pdf"]:hover,
.legal-content a[type="application/pdf"]:hover,
a.pdf-cta[type="application/pdf"]:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .service-detail-content iframe {
        height: 70vh;
    }
}

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

.service-features {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
}

.service-features li {
    color: var(--text-dark);
    padding: 0.5rem 0;
}

/* Inline icon (lampe) dans la note de tarification */
.pricing-note .inline-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    vertical-align: -4px;
    margin-right: 6px;
}

.pricing-note .inline-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary-color);
}

/* Process Section */
.process-section {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.process-step {
    text-align: center;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 15px;
    transition: var(--transition);
}

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

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-green));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1.5rem;
    font-family: 'PaytoneOne', sans-serif;
}

.process-step h3 {
    color: var(--secondary-dark);
    margin-bottom: 1rem;
}

.process-step p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Pricing Section (removed) */

/* ==========================================
   PORTFOLIO PAGE
   ========================================== */

.portfolio-section {
    padding: 80px 0;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--light-gray);
    border: 2px solid transparent;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-dark);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

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

.portfolio-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.portfolio-image {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-green));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0; /* icônes SVG uniquement */
}

/* Icônes SVG dans les réalisations */
.portfolio-placeholder svg {
    width: 72px;
    height: 72px;
    stroke: #fff;
    opacity: 0.95;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-placeholder svg {
    transform: scale(1.07);
    opacity: 1;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: var(--white);
    padding: 2rem;
    transform: translateY(60%);
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-overlay h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.portfolio-overlay p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.portfolio-tags span {
    background-color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* Testimonials (removed) */

/* ==========================================
   CONTACT PAGE
   ========================================== */

.contact-section {
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
}

.contact-form-wrapper h2,
.contact-info-wrapper h2 {
    color: var(--secondary-dark);
    margin-bottom: 1rem;
}

.contact-form-wrapper p {
    color: var(--text-light);
    margin-bottom: 1rem; /* réduit pour éviter un grand vide avant le formulaire */
}

/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--text-dark);
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

.checkbox-label {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
}

/* Consentement RGPD - style amélioré */
.consent-box {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 0.75rem;
    align-items: start;
    cursor: pointer;
    background: #f8f9fa;
    border: 1px solid var(--light-gray);
    border-radius: 12px;
    padding: 0.9rem 1rem;
}

.consent-box input[type="checkbox"] {
    /* masquer la checkbox native mais garder l’accessibilité (focus au clavier OK) */
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
}

.consent-check {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--primary-color);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
    color: transparent; /* check masqué par défaut */
}

.consent-box input[type="checkbox"]:checked + .consent-check {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.consent-box input[type="checkbox"]:checked + .consent-check::before {
    content: '✓';
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
}

.consent-content {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.consent-title {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--text-dark);
    font-weight: 600;
}

.consent-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.consent-required { color: #000; }

.consent-note {
    color: var(--text-light);
    font-size: .9rem;
}

.consent-box:hover {
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.consent-box:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-block {
    width: 100%;
}

.form-message {
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    display: none;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    display: block;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    display: block;
}

/* Contact Info Cards */
.contact-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info-card {
    display: flex;
    gap: 1.5rem;
    align-items: start;
    padding: 1.5rem;
    background-color: var(--light-gray);
    border-radius: 15px;
    transition: var(--transition);
    /* Accent jaune sur la card */
    border-left: 4px solid var(--secondary-yellow);
}

.contact-info-card:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateX(10px);
    border-left-color: var(--secondary-yellow);
}

.contact-info-card:hover h3,
.contact-info-card:hover p,
.contact-info-card:hover a {
    color: var(--white);
}

.contact-info-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    flex-shrink: 0;
    border: 2px solid var(--secondary-yellow);
}

.contact-info-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--primary-color);
}

/* Barre jaune sous le titre de section */
.contact-section .section-title {
    position: relative;
    display: inline-block;
}

.contact-section .section-title::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 4px;
    background: var(--secondary-yellow);
    border-radius: 2px;
}

/* Conserver un bon contraste au survol */
.contact-info-card:hover .contact-info-icon {
    background: #ffffff;
}

.contact-info-card:hover .contact-info-icon svg {
    stroke: var(--primary-color);
}

.contact-info-card h3 {
    color: var(--secondary-dark);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.contact-info-card p,
.contact-info-card a {
    color: var(--text-light);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-info-card a:hover {
    color: var(--secondary-yellow);
    /* pas de barre pointillée au survol */
}

.social-contact {
    margin-top: 2rem;
}

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

.social-links-large {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--light-gray);
    border-radius: 10px;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateX(10px);
}

.social-link span:first-child {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0; /* icône SVG uniquement */
    color: #fff; /* fill=currentColor dans le SVG */
}

/* Dimensionner et lisser les SVG dans le rond */
.social-link span:first-child svg {
    width: 20px;
    height: 20px;
}

.social-link:hover span:first-child {
    background-color: var(--white);
    color: var(--primary-color);
}

/* Touche jaune subtile sur le texte du réseau au survol */
.social-link:hover .social-name {
    color: var(--secondary-yellow);
}

/* Accessibilité au clavier */
.social-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 12px;
}

.social-name {
    font-weight: 600;
    transition: color 0.2s ease, border-color 0.2s ease;
}

/* ==========================================
   RESPONSIVE DESIGN FOR PAGES
   ========================================== */

@media (max-width: 968px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .service-detail-card,
    .service-detail-card.reverse {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .service-detail-icon {
        margin: 0 auto;
    }
    
    .service-detail-card.reverse .service-detail-icon {
        order: 1;
    }
    
    .service-detail-card.reverse .service-detail-content {
        order: 2;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.featured {
        transform: scale(1);
    }
}

/* Tally embed styling */
.tally-form iframe {
  width: 100%;
  max-width: 100%;
  background: transparent; /* fonctionne avec ?transparentBackground=1 */
  border: 0;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.tally-fallback {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-light);
}
.tally-fallback a { color: var(--primary-color); text-decoration: underline; }
.tally-fallback a:hover { color: var(--secondary-green); }

/* Tally thank-you message */
.tally-thanks {
  margin-top: 1rem;
  padding: 2rem;
  background: #fff;
  border: 1px solid var(--light-gray);
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}
.tally-thanks-icon {
  width: 56px;
  height: 56px;
  color: var(--primary-color); /* stroke=currentColor in SVG */
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.08));
}
.tally-thanks h3 {
  margin: .6rem 0 .15rem;
  color: var(--secondary-dark);
}
.tally-thanks p {
  margin: 0;
  color: var(--text-light);
}
/* Adjust spacing when message replaces the form */
.tally-form[hidden] + .tally-thanks { margin-top: 0.5rem; }

