/* --- Variables --- */
:root {
    --primary-color: #2c3e50; /* Bleu marine foncé */
    --secondary-color: #f39c12; /* Or vif */
    --sterna-blue: #007AFF;
    --background-color: #f4f6f9; /* Blanc cassé */
    --text-color: #333;
    --light-text-color: #ecf0f1;
    --accent-color: #e67e22; /* Orange pour les détails */
}

/* --- Base Styles --- */
body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    line-height: 1.6;
    padding-bottom: 2rem;
    word-wrap: break-word; /* Ensure long words break and wrap */
}

/* --- Typographie --- */
.main-title {
    font-family: 'Merriweather', serif;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin: 0;
}

.subtitle {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--light-text-color);
    font-weight: 300;
    margin: 0;
}

.section-title {
    font-family: 'Merriweather', serif;
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 0.5rem auto 0;
}

/* --- Header --- */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.logo-container {
    margin-bottom: 1rem;
}

.logo {
    max-width: 120px;
    height: auto;
    border-radius: 50%;
    border: 3px solid var(--secondary-color);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* --- Conteneurs et Sections --- */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.section-container {
    background-color: white;
    border-radius: 15px;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.5s ease-in-out;
}

.section-container.hidden {
    display: none;
}

/* --- Page de contact --- */
.contact-container {
    background-color: white;
    padding: 2rem 1rem; /* Adjusted padding */
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 2rem auto;
    text-align: center;
}

.contact-container h1 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.contact-container p {
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    hyphens: auto; /* Allow for hyphenation on long words */
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
}

.contact-form label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: -1rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Crucial for preventing overflow */
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.3);
}

.contact-form textarea {
    resize: vertical;
}

.contact-form button[type="submit"] {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-form button[type="submit"]:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* --- Politique de confidentialité --- */
.privacy-page .privacy-content {
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    max-width: 800px;
    margin: 2rem auto;
}

.privacy-page h1 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.privacy-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.privacy-content p strong {
    color: var(--secondary-color);
}

.privacy-page .back-button {
    text-align: center;
    margin-top: 2rem;
}

/* --- Boutons des Livres --- */
#book-selection {
    text-align: center;
}

.book-button {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border: none;
    padding: 1rem 2rem;
    margin: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    width: calc(100% - 1rem); /* Use calc for better spacing */
    max-width: 250px;
}

.book-button:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

/* --- Liste des Parachiot --- */
.paracha-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.paracha-item {
    background-color: #f9f9f9;
    padding: 1.2rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
    transition: all 0.3s ease;
    word-wrap: break-word; /* Ensure text inside breaks */
}

.paracha-item:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.15);
}

.back-button {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    margin-top: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    width: 100%;
    box-sizing: border-box; /* Ensure padding is included in width */
}

/* --- Détails de la Paracha --- */
#paracha-details h2 {
    color: var(--secondary-color);
    text-align: center;
    font-family: 'Merriweather', serif;
    font-size: clamp(1.8rem, 5vw, 2rem);
    margin-bottom: 1.5rem;
}

#video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.pdf-button {
    display: block;
    width: calc(100% - 2rem);
    max-width: 250px;
    margin: 0 auto 1.5rem;
    background-color: var(--accent-color);
    color: white;
    text-align: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pdf-button:hover {
    background-color: #d35400;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

/* --- Footer --- */
.main-footer {
    background: linear-gradient(to right, var(--primary-color), #34495e);
    color: var(--light-text-color);
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
    z-index: 1000;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-content p {
    margin: 0.3rem 0;
    font-size: 0.95rem;
}

.dedication, .copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
}

.privacy-link {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    margin: 0.8rem 0;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

/* --- Media Queries pour les grands écrans --- */
@media (min-width: 768px) {
    .main-header {
        padding: 3rem 1rem;
    }
    
    .logo {
        max-width: 150px;
    }

    .section-container {
        padding: 2rem;
    }
    
    .book-button {
        width: auto;
    }

    .paracha-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .back-button {
        width: auto;
    }
    
    .pdf-button {
        width: 250px;
    }

    .main-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 1.5rem 1rem;
    }
    
    body {
        padding-bottom: 9rem;
    }
}

.video-wrapper {
  text-align: center;
  margin-bottom: 2rem;
}

.video-wrapper iframe {
  max-width: 100%;
  border-radius: 8px;
}

.pdf-link a {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
  color: #2c3e50;
  text-decoration: none;
}

.pdf-link a:hover {
  text-decoration: underline;
}

/* Cherche cette ligne vers la fin de ton CSS et remplace display: none par flex */
.store-buttons {
    display: flex; /* Remplace none par flex pour tester */
    gap: 15px;
    margin-top: 15px;
}

/* Sur mobile/tablette : affiché */
@media (max-width: 768px) {
  .store-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
  }
}

.store-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.store-btn img {
  height: 40px;
  display: block;
}

.store-btn:hover img {
  opacity: 0.85;
}

        /* Styles pour la Pop-up iOS */
.modal-overlay-ios {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none; /* Caché par défaut */
    justify-content: center;
    align-items: center;
    z-index: 5000;
    padding: 20px;
}

.box-modal-ios {
    background: white;
    width: 90%; /* Meilleure adaptation mobile */
    max-width: 380px;
    padding: 25px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    color: #333; /* Pour être sûr que le texte soit lisible */
}

/* Ajoute ça pour que le titre H2 dans la popup soit propre */
.box-modal-ios h2 {
    margin-top: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    color: var(--primary-color);
}

.instructions-ios {
    text-align: left;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 25px;
}

.step-ios {
    margin-bottom: 22px; /* espace clair entre les étapes */
}

.step-ios p {
    margin: 0;
    line-height: 1.55; /* plus lisible, plus aéré */
    display: flex;
    align-items: center;
    gap: 8px; /* espace naturel entre numéro / texte / icône */
    flex-wrap: wrap;
}

.share-icon {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap; /* empêche la coupure */
}

.share-icon svg {
    flex-shrink: 0;
}

.step-number {
    background: var(--sterna-blue);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.btn-close-ios {
    background: var(--sterna-blue);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 15px;
    font-weight: bold;
    width: 100%;
    cursor: pointer;
}

/* Cibler les boutons de store */
.store-btn {
  display: inline-block;
  transition: transform 0.3s ease; /* Rend le mouvement fluide */
}

/* L'effet quand la souris passe dessus (hover) */
.store-btn:hover {
  transform: translateY(-8px); /* Fait monter le bouton de 8 pixels */
}

/* Optionnel : ajouter une légère ombre pour accentuer l'effet de levée */
.store-btn img {
  transition: box-shadow 0.3s ease;
  border-radius: 10px; /* Ajuste selon l'arrondi de tes images */
}

.store-btn:hover img {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}