/*
Theme Name:   Eco Fenêtre
Description:  Twenty Twenty-Five Child Theme
Author:       Jonathan Webpixelia
Author URI:   http://webpixelia.com
Description: Testez vos compétences grammaticales en arabe avec notre site d'analyses grammaticales. Découvrez votre niveau à travers des quiz captivants, disponibles en trois niveaux de difficulté. Améliorez votre maîtrise de la grammaire arabe de manière ludique et interactive.
Template:     twentytwentyfive
Requires at least: 6.4
Tested up to: 6.4
Requires PHP: 7.0
Version: 1.0 
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  eco-fenetre
*/

*, ::after, ::before {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}

#absolute-infos {
  position: absolute;
  top: 50%;
  left: 50%;
}

.left-1 {
  left: 1rem !important;
  right: 50% !important;
}

.top-2 {
  top: 2rem !important;
  bottom: auto !important;
}

.top-8 {
  top: 8rem;
  bottom: auto !important;
}

.z-index-10 {
  z-index: 10;
}

.box-shadow, .box-shadow-hover:hover {
  box-shadow: var(--wp--preset--shadow--shadow-bottom)
}

.rounded-md {
  border-radius: var(--wp--preset--border-radius--medium);
}

.border-color-hover:hover {
  border-color: var(--wp--preset--color--blue-night) !important;
}
.translate-hover {
  transition-duration: 300ms;
}
.translate-hover:hover {
  translate: 0 calc(0.25rem * -1);
}
.scale-up {
  overflow: hidden;
}
.scale-up img{
  transition-duration: 300ms;
}
:hover > .scale-up img{
  transform: scale(1.05);
}

.mw-300 {
  max-width: 300px;
}

.mw-400 {
  max-width: 400px;
}

details {
    border: 1px solid var(--wp--preset--color--blue-night);
    border-radius: 0.5rem;
    padding: 1rem 2rem;
}
summary {
  color: var(--wp--preset--color--blue-night);
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
}
.wp-block-button {
  transition: all 0.3s ease;
}
.wp-block-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ========================================
   VARIABLES CSS
======================================== */
:root {
  /* Espacements */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 0.75rem;
  --space-lg: 1rem;
  --space-xl: 1.5rem;
  --space-2xl: 2rem;
  --space-3xl: 2.5rem;
  
  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;
  
  /* Ombres */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 15px 30px rgba(0, 0, 0, 0.2);
  
  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ========================================
   BASE & TYPOGRAPHIE
======================================== */
footer {
  margin-block-start: 0;
}

/* ========================================
   CLASSES UTILITAIRES
======================================== */
.flex { display: flex; }
.inline-flex { display: inline-flex !important; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.relative { position: relative; }
.text-align-center { text-align: center; }
.opacity-50 { opacity: 0.5; }
.list-style-none { list-style: none; padding: 0;}
.w-100 { width: 100%; }
.text-center { 
  text-align: center;
  margin-top: var(--space-3xl);
}
.mb-10 { margin-bottom: var(--space-3xl); }
.h-28 { height: 7rem; }
.bg-transparent { background-color: transparent; }
.flex-basis-auto {
  flex-basis: auto !important;
}
.flex-grow-1 {
  flex-grow: 1 !important;
}
.overflow-hidden {
  overflow: hidden !important;
}

@media screen and (max-width: 781px) {
  .text-center {
    text-align: center;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column.flex-basis-auto {
    flex-basis: auto !important;
  }
}

/*==============
   COMPOSANTS: FAQ
==============*/
/* Masque le marker natif (WebKit / Blink) */
#faq-group details summary::-webkit-details-marker {
  display: none;
}

/* Masque le marker natif pour navigateurs supportant ::marker */
#faq-group details summary::marker {
  content: "";
  display: none;
}

#faq-group details summary {
  position: relative;
  padding-right: 2rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  outline: none;
}

#faq-group details summary:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  border-radius: 6px;
}

#faq-group details summary::after {
  content: "+";
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
  color: inherit;
  transition: transform 0.18s ease, opacity 0.18s ease;
  display: inline-block;
  width: 1.2rem;
  text-align: center;
}

#faq-group details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(0deg);
}
@media (max-width: 640px) {
  #faq-group details summary {
    padding-right: 2.6rem;
  }
  #faq-group details summary::after {
    right: 0.6rem;
  }
}

#faq-group details[open] summary {
  font-weight: 700;
}

#faq-group details summary::after {
  color: var(--wp--preset--color--blue-night);
}

/* Rendre les embeds YouTube responsive */
iframe {
  width: 100% !important;
  height: auto;
  aspect-ratio: 16 / 9;
  max-width: 100%;
}

/*========================================
   MODAL
========================================*/
/* --- Overlay du modal --- */
.modal-overlay {
  display: none;
  position: fixed;
  max-width: 100%;
  inset: 0;
  background-color: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* --- Contenu du modal --- */
.modal-content {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem;
  width: 90%;
  max-width: 56rem;
  position: relative;
  animation: slideDown 0.3s ease;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

@keyframes slideDown {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* --- Bouton de fermeture --- */
.close-modal {
  position: absolute;
  top: 0.8rem;
  right: 1.2rem;
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
  transition: color 0.3s ease;
}
.close-modal:hover {
  color: #000;
}
