/* === Couleurs et polices globales === */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f7f8;
    color: #374151;
}

/* === Footer moderne === */
.footer-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

.footer-social-icon {
    transition: all 0.3s ease;
    transform: scale(1);
}

.footer-social-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.newsletter-section {
    background: linear-gradient(135deg, #0d9488 0%, #059669 100%);
    position: relative;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="1" fill="white" opacity="0.1"/><circle cx="40" cy="80" r="1" fill="white" opacity="0.1"/><circle cx="60" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.footer-link {
    transition: all 0.2s ease;
}

.footer-link:hover {
    transform: translateX(3px);
}

.footer-stats {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* === Navbar et logo === */
.navbar-sticky {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.navbar-logo {
    max-height: 50px;
}
.mobile-menu {
    display: none;
    background-color: rgb(255,255,255,0.98);
}
.mobile-menu.active {
    display: block;
}

/* === Couleurs AEES === */
.aees-primary-text { color: #0d9488; }
.aees-primary-bg { background-color: #0d9488; }
.aees-primary-hover-bg:hover { background-color: #0f766e; }
.aees-dark-text { color: #134e4a; }
.aees-accent-text { color: #0ea5e9; }
.aees-accent-bg { background-color: #0ea5e9; }
.aees-accent-hover-bg:hover { background-color: #0284c7; }

/* === Sections de fond === */
.section-bg-light { background-color: #f0fdfa; }
.section-bg-alt { background-color: #ecfeff; }

/* === Titres de section === */
.section-title,
.section-title-main {
    font-weight: 800;
    display: inline-block;
    border-bottom: 4px solid #0d9488;
    color: #134e4a;
    padding-bottom: 0.75rem;
}
.section-title-main {
    color: #134e4a;
    border-bottom-width: 4px;
}
.section-title {
    border-bottom-width: 3px;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

/* === Cartes (cards) et variantes === */
.card,
.news-item-card,
.bureau-member-card,
.testimonial-card,
.resource-item {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}
.card:hover,
.news-item-card:hover,
.resource-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}
.card-image-container,
.news-card-image,
.news-item-image-container {
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 0.75rem 0.75rem 0 0;
}
.card-content,
.news-item-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.card-content h3,
.news-item-content h3 {
    color: #134e4a;
}
.card-content p,
.news-item-content p {
    color: #4b5563;
    flex-grow: 1;
}
.card-action {
    margin-top: auto;
    padding-top: 1rem;
}

/* === Boutons et CTA === */
.cta-button,
.read-more-link,
.submit-button,
.resource-link,
.primary-cta,
.secondary-cta,
.tertiary-cta {
    display: inline-block;
    font-weight: 600;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: scale(1);
    text-align: center;
}
.cta-button {
    background-color: #16a34a;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}
.cta-button:hover {
    background-color: #15803d;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}
.primary-cta {
    background-color: #16a34a;
    color: #fff;
    transition: background-color 0.3s ease;
}
.primary-cta:hover {
    background-color: #15803d;
}
.secondary-cta {
    background-color: #0d9488;
    color: #fff;
    transition: background-color 0.3s ease;
}
.secondary-cta:hover {
    background-color: #0f766e;
}
.tertiary-cta {
    background-color: #0284c7;
    color: #fff;
    transition: background-color 0.3s ease;
}
.tertiary-cta:hover {
    background-color: #0369a1;
}
.read-more-link {
    background-color: #0284c7;
    color: #fff;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    margin-top: auto;
}
.read-more-link:hover {
    background-color: #0369a1;
}
.submit-button {
    background-image: linear-gradient(to right, #2563eb, #0ea5e9);
    color: #fff;
    padding: 0.875rem 2rem;
    font-size: 1rem;
}
.submit-button:hover {
    background-image: linear-gradient(to right, #1d4ed8, #0284c7);
    transform: scale(1.05);
}
.resource-link {
    background-color: #e0f2fe;
    color: #0284c7;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: background-color 0.3s ease;
}
.resource-link:hover {
    background-color: #bae6fd;
}

/* === Social icons === */
.social-icon {
    color: #cbd5e1;
    transition: color 0.3s ease;
}
.social-icon:hover {
    color: #ccfbf1;
}

/* === Breadcrumbs === */
.breadcrumb {
    font-size: 0.875rem;
    color: #4b5563;
}
.breadcrumb a:hover {
    text-decoration: underline;
    color: #0d9488;
}

/* === Grilles et galeries === */
.activity-image-grid,
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.activity-image-grid img,
.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.gallery-item img {
    height: 200px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* === Lightbox (galerie) === */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}
.lightbox-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 80%;
    max-height: 80vh;
}
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}
.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
}

/* === Témoignages === */
.testimonial-card {
    background-color: #f0fdfa;
    border-left: 4px solid #0d9488;
}

/* === Formulaires === */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}
.form-input, .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    outline: none;
    transition: all 0.3s ease-in-out;
}
.form-input:focus, .form-textarea:focus {
    outline: 2px solid #3b82f6;
    border-color: transparent;
    background-color: #f8fafc;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
.form-textarea {
    min-height: 140px;
}
.form-status-success {
    margin-top: 1rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    color: #047857;
    background-color: #d1fae5;
    border: 1px solid #10b981;
    border-radius: 0.375rem;
}
.form-status-error {
    margin-top: 1rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    color: #b91c1c;
    background-color: #fee2e2;
    border: 1px solid #f87171;
    border-radius: 0.375rem;
}
.form-status-loading {
    margin-top: 1rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    color: #1d4ed8;
    background-color: #bfdbfe;
    border: 1px solid #3b82f6;
    border-radius: 0.375rem;
}

/* === Contact & info === */
.contact-info-item {
    display: flex;
    align-items: start;
    padding: 1rem;
    background-color: #e0f2fe;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.contact-info-icon {
    color: #2563eb;
    font-size: 1.5rem;
    margin-right: 1rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* === Ressources === */
.resource-item {
    background-color: #ffffff;
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.3s ease;
}
.resource-item:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}
.resource-icon {
    color: #0891b2;
    margin-right: 0.75rem;
}

/* === Divers pour les pages spécifiques === */
.partner-logo {
    max-height: 60px;
    margin: 0.5rem;
}
.feature-icon {
    background-color: #ccfbf1;
    color: #0f766e;
    padding: 0.75rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}
.bureau-member-card img {
    border: 3px solid #99f6e4;
}

/* === Spécifiques page-header (dégradés) === */
.page-header {
    background: linear-gradient(135deg, #0891b2 0%, #0d9488 100%);
    color: white;
}
.actions .page-header { background: linear-gradient(135deg, #0891b2 0%, #0d9488 100%); }
.engagement-communautaire .page-header { background: linear-gradient(135deg, #059669 0%, #0d9488 100%); }
.engagement-social .page-header { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); }
.galerie .page-header { background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%); }
.contact .page-header { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.nous-rejoindre .page-header { background: linear-gradient(135deg, #10b981 0%, #0d9488 100%); }
.ressources .page-header { background: linear-gradient(135deg, #22d3ee 0%, #0ea5e9 100%); }
.actualites .page-header { background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%); }

/* === Spécifiques pour la galerie d'événements === */
.album-title {
    color: #6d28d9;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 2px dotted #c084fc;
}

/* === Spécifiques pour la page rapport bureau (loading spinner) === */
.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #0d9488;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Responsive (exemple) === */
@media (max-width: 768px) {
    .card-content, .news-item-content, .p-6 {
        padding: 1rem;
    }
    .gallery-grid, .activity-image-grid {
        grid-template-columns: 1fr;
    }
}

/* === Spécifiques Accueil === */
.hero-section {
    background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
    color: white;
}
.hero-section h1, .hero-section p {
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}
.hero-logo {
    max-width: 160px;
    height: auto;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

    @keyframes scroll-logos {
        0% { transform: translateX(0); }
        100% { transform: translateX(-50%); }
    }
    .animate-scroll-logos {
        display: flex;
        width: max-content;
        animation: scroll-logos 30s linear infinite;
    }

/* === Barre de recherche moderne (desktop) === */
#search-form {
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.07);
}
#search-input:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 2px #5eead4;
}
#search-suggestions {
  max-height: 260px;
  overflow-y: auto;
  font-size: 1rem;
}
#search-suggestions .suggestion {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: background 0.2s;
}
#search-suggestions .suggestion:hover,
#search-suggestions .suggestion.active {
  background: #f0fdfa;
  color: #0d9488;
}

/* === Bouton 'Rechercher' intégré dans l'input desktop === */
#search-form .relative.flex-1 {
  position: relative;
}
#search-input {
  padding-right: 6.5rem !important; /* espace pour le bouton */
}
#desktop-search-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 600;
  background: #0d9488;
  color: #fff;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.07);
  border: none;
  transition: background 0.2s;
  z-index: 10;
}
#desktop-search-btn:hover {
  background: #0f766e;
}

/* === Section Hero avec image d'arrière-plan === */
.hero-section {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
    pointer-events: none;
    z-index: 2;
}

.hero-section .container {
    position: relative;
    z-index: 3;
}

.hero-section h1 {
    color: white;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    font-weight: 800;
}

.hero-section p {
    color: rgba(255,255,255,0.95);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-logo {
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.3));
    animation: float 6s ease-in-out infinite;
}

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

/* === OPTIMISATIONS D'IMAGES ET PERFORMANCE === */

/* Lazy loading des images */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.lazy-image.loaded {
    opacity: 1;
}

/* Placeholder pendant le chargement */
.image-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Support WebP avec fallback */
.webp-supported .fallback-image {
    display: none;
}

.no-webp .webp-image {
    display: none;
}

/* Optimisation des images responsives */
.responsive-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Images critiques (hero, logo) - pas de lazy loading */
.critical-image {
    display: block;
    width: 100%;
    height: auto;
}

/* Performance hint pour les images */
img[loading="lazy"] {
    content-visibility: auto;
}

/* Préchargement des images importantes */
.preload-image {
    position: absolute;
    top: -9999px;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* === FIN OPTIMISATIONS D'IMAGES === */

/* === Carrousel des témoignages === */
#testimonial-carousel {
    /* Hide scrollbar for all browsers */
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    background: linear-gradient(135deg, #f0fdfa 0%, #f8fafc 100%);
    border-radius: 2rem;
    box-shadow: 0 8px 32px 0 rgba(16, 185, 129, 0.08), 0 1.5px 6px 0 rgba(16, 185, 129, 0.04);
    padding: 2.5rem 0 2.5rem 0;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1.5px solid #e0f2fe;
}

#testimonial-carousel::-webkit-scrollbar {
    display: none;
}

#testimonial-track {
    display: flex;
    width: 100%;
    transition: transform 0.7s cubic-bezier(0.4,0,0.2,1);
}

.testimonial-card {
    min-width: 100%;
    box-sizing: border-box;
    background: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 4px 24px 0 rgba(16, 185, 129, 0.08), 0 1.5px 6px 0 rgba(16, 185, 129, 0.04);
    border: 1px solid #f1f5f9;
    margin: 0 0.5rem;
    transition: box-shadow 0.3s;
}

.testimonial-card:hover {
    box-shadow: 0 8px 32px 0 rgba(16, 185, 129, 0.16), 0 3px 12px 0 rgba(16, 185, 129, 0.08);
}

@media (min-width: 768px) {
    #testimonial-carousel {
        padding: 3rem 2rem 3rem 2rem;
    }
    .testimonial-card {
        min-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

/* === Carrousel Bureau Exécutif === */
#bureau-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    width: 100%;
    /* Éviter les problèmes de sub-pixel rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#bureau-track {
    display: flex;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    /* Assurer un rendu pixel-perfect */
    transform-origin: 0 0;
    perspective: 1000px;
}

#bureau-track .testimonial-card {
    flex: 0 0 100%;
    max-width: 100%;
    margin: 0;
    transform: translateZ(0); /* Force hardware acceleration */
    box-sizing: border-box;
    padding: 0 24px; /* Padding interne pour l'espacement visuel optimal */
    /* Éviter les problèmes de sub-pixel */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Responsive design pour le carrousel */
@media (min-width: 768px) {
    #bureau-track .testimonial-card {
        flex: 0 0 100%;
        max-width: 100%;
        margin: 0;
    }
}

/* Boutons de navigation du carrousel */
#bureau-prev,
#bureau-next {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 10;
    border: 1px solid #e2e8f0;
}

#bureau-prev:hover,
#bureau-next:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background-color: #f1f5f9;
}

/* Points indicateurs */
#bureau-dots button {
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

#bureau-dots button:hover {
    transform: scale(1.3);
}

#bureau-dots button:focus {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* Animation pour les cartes */
#bureau-track .testimonial-card {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

#bureau-track .testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    #bureau-prev,
    #bureau-next {
        display: none !important;
    }
    
    #bureau-carousel {
        touch-action: pan-x;
    }
}

/* === Fin Carrousel Bureau Exécutif === */

/* === Logo du footer - style similaire au hero mais adapté au fond sombre === */
footer .h-20 {
    transition: all 0.3s ease;
    filter: brightness(1.1);
}

footer .h-20:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.4);
    border-color: #5eead4;
}

/* === Styles génériques pour tous les carrousels === */
.testimonial-card {
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Carrousels génériques */
[id*="carousel"] {
    position: relative;
    overflow: hidden;
}

[id*="track"] {
    display: flex;
    width: 100%;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Boutons de navigation génériques */
button[id*="prev"],
button[id*="next"] {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(203, 213, 225, 0.5);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

button[id*="prev"]:hover,
button[id*="next"]:hover {
    background: rgba(240, 253, 250, 0.95);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

button[id*="prev"] {
    left: 16px;
}

button[id*="next"] {
    right: 16px;
}

/* Points indicateurs génériques */
[id*="dots"] button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #cbd5e1;
    opacity: 0.6;
}

[id*="dots"] button:hover {
    transform: scale(1.2);
    opacity: 0.8;
}

[id*="dots"] button.bg-teal-400,
[id*="dots"] button[class*="bg-teal"] {
    background: #2dd4bf !important;
    opacity: 0.9 !important;
}

/* === Fin styles génériques carrousels === */

/* === Modal Hébergement === */
#hebergementModal {
    z-index: 9999;
    /* Évite les problèmes de scroll sur iOS */
    -webkit-overflow-scrolling: touch;
}

#hebergementModal .modal-content {
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.2s ease-out;
}

#hebergementModal:not(.hidden) .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Styles pour l'iframe Google Forms */
#hebergementModal iframe {
    min-height: 400px;
    background: white;
    /* Améliore le rendu sur mobile */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Animation d'ouverture/fermeture */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

#hebergementModal.show .modal-content {
    animation: modalFadeIn 0.2s ease-out forwards;
}

#hebergementModal.hide .modal-content {
    animation: modalFadeOut 0.2s ease-out forwards;
}

/* Responsive pour mobile */
@media (max-width: 640px) {
    #hebergementModal {
        padding: 0;
        align-items: flex-start;
    }
    
    #hebergementModal .flex.min-h-full {
        min-height: 100vh;
        align-items: flex-start;
        padding: 0.5rem;
    }
    
    #hebergementModal .modal-content {
        margin: 0;
        max-height: calc(100vh - 1rem);
        border-radius: 0.75rem;
        overflow: hidden;
    }
    
    #hebergementModal iframe {
        height: 400px !important;
        /* Améliore la performance sur mobile */
        will-change: scroll-position;
    }
    
    /* Améliore le touch pour les boutons */
    #hebergementModal button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Responsive pour tablettes */
@media (min-width: 641px) and (max-width: 768px) {
    #hebergementModal iframe {
        height: 500px !important;
    }
}

/* Améliorations pour les appareils tactiles */
@media (pointer: coarse) {
    #hebergementModal button {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    #hebergementModal .fas.fa-times {
        font-size: 1.25rem;
    }
}

/* Support pour les appareils avec encoche (notch) */
@supports (padding: max(0px)) {
    @media (max-width: 640px) {
        #hebergementModal .modal-content {
            padding-top: max(0.5rem, env(safe-area-inset-top));
            padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
        }
    }
}

/* === Styles pour la solution alternative === */
.solution-alternative {
    animation: slideInUp 0.4s ease-out;
}

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

/* Amélioration du bouton de solution alternative */
.solution-alternative a {
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.solution-alternative a:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.3);
}

/* Mobile optimizations pour la solution alternative */
@media (max-width: 640px) {
    #hebergementModal .solution-alternative {
        margin: 0.75rem 0;
        padding: 1rem;
    }
    
    #hebergementModal .solution-alternative a {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }
}

/* === Fin Modal Hébergement === */

/* === Masquer la signature Tally et styles opentech === */
/* Cache la signature "créé avec Tally" dans les formulaires intégrés */

/* Styles CSS pour masquer la signature dans le footer des formulaires Tally */
[data-tally-embed] .tally-branding,
[data-tally-embed] [class*="branding"],
[data-tally-embed] [class*="footer"],
[data-tally-embed] a[href*="tally.so"],
div[class*="tally"] a[href*="tally.so"],
.tally-embed-footer,
.tally-branding,
a[href*="tally.so"][target="_blank"]:not(.manual-tally-link) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Style global pour tous les éléments contenant des liens Tally non désirés */
body a[href*="tally.so"]:not(.manual-tally-link) {
    display: none !important;
}

/* Masquer les éléments avec texte Tally via JavaScript (sera appliqué dynamiquement) */
.hide-tally-signature {
    display: none !important;
}

/* === Styles pour la signature opentech === */
.opentech-signature {
    font-size: 12px !important;
    color: #6b7280 !important;
    text-decoration: none !important;
    opacity: 0.7 !important;
    transition: all 0.2s ease !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
}

.opentech-signature:hover {
    opacity: 1 !important;
    color: #0d9488 !important;
    text-decoration: none !important;
}

.opentech-signature:focus {
    outline: 2px solid #0d9488 !important;
    outline-offset: 2px !important;
    border-radius: 2px !important;
}