/* 
   Regroupement dee fichier CSS : style_menu.css style_template.css   
*/


body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #eef2f5;
    margin-bottom: 110px; /* Espace pour le footer */
 }


/*==================== LIENS ====================*/
a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  color: #246496;
  text-decoration: underline;
}

a:focus {
  outline: 2px solid #007BFF;
  outline-offset: 2px;
}

h1 {
    color:#2c6faa;
    padding: 12px;
    text-align: center;
    margin: 0;
}

h2 {
    color: #2c6faa;
    text-align: center;
    margin-top: 25px;
}

h3 {
  color: #f5a623;
  font-size: 1.1rem;
  font-weight: bold;
}

h4 {
  color: #d0021b;
  font-size: 1.1rem;
  font-weight: bold;
}

.section {
    margin: 0 auto 30px auto;
    max-width: 1100px;
}

/* ==========================================================================
   NAVIGATION (MENU)
   ========================================================================== */
/* --- MENU FULL WIDTH --- */
.nav-menu {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 15px 0;
    background: linear-gradient(90deg, #2c6faa, #4da3ff);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    transition: 0.3s;
}

.nav-menu a:hover {
    background: white;
    color: #2c6faa;
}

/* --- FORMULAIRE --- */
.contact-wrapper {
    max-width: 650px;
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.form-title {
    color: #2c6faa;
    text-align: center;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box; /* Crucial pour la largeur */
    font-size: 16px;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: #2c6faa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 111, 170, 0.1);
}

/* Bouton Envoyer */
.btn-submit {
    background: #2c6faa;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: 0.3s;
}

.btn-submit:hover {
    background: #1f4f7a;
    transform: translateY(-1px);
}

/* Messages Alertes */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
}
.error { background: #fee2e2; color: #b91c1c; border: 1px solid #f87171; }
.success { background: #dcfce7; color: #15803d; border: 1px solid #4ade80; }

/* Bouton Envoyer */
.btn-submit {
    background: #2c6faa;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: 0.3s;
}

.btn-submit:hover {
    background: #1f4f7a;
    transform: translateY(-1px);
}

/* Messages Alertes */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
}
.error { background: #fee2e2; color: #b91c1c; border: 1px solid #f87171; }
.success { background: #dcfce7; color: #15803d; border: 1px solid #4ade80; }

/* ==========================================================================
   TABLEAUX DE DONNÉES
   ========================================================================== */
table, #tempTable {
    border-collapse: collapse;
    width: 95%;
    background: #fff;
    margin: 0 auto 20px auto;
}

th, td {
    border: 1px solid #333;
    padding: 8px;
    text-align: center;
}

/*==================== FORMULAIRE  ====================*/

/* Supprime les bordures des tableaux à l'intérieur d'un formulaire */
form table, form th, form td {
    border: none !important;
}

form {
    width: 30%;               /* Réduit de 50% à 30% */
    min-width: 300px;         /* Sécurité pour éviter qu'il soit trop écrasé sur mobile */
    background: #fff;
    margin: 0 auto 20px auto; /* Garde le formulaire centré */
    padding: 15px;            /* Ajoute un peu d'espace interne pour l'esthétique */
    border: 1px solid #ddd;    /* Optionnel : ajoute un contour léger pour le délimiter */
}

/*==================== CADRES ====================*/
.td-box {
  border: 1px solid #ccc;
  padding: 0.25em 0.5em;
  vertical-align: top;
}

#tempTable tr.active {
    outline: 3px solid #000;
    font-weight: bold;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

/*==================== BOUTONS ====================*/
button,
.btn {
  padding: 10px 16px;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  background-color: #007BFF;
  color: #ffffff;
  transition: background-color 0.3s;
}

button:hover,
.btn:hover {
  background-color: #0056b3;
}

button:focus {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/*==================== CONTENEURS ====================*/
/* Ancien container conservé pour compatibilité */
.container {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Nouveau container recommandé */
.container-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/*==================== POPUP ====================*/
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-overlay.active {
  display: flex;
}

.popup-content {
  background: #ffffff;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 8px;
  position: relative;
  text-align: center;
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}


/*==================== ICÔNES ====================*/
.image-container {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  vertical-align: middle;
}

.image-container img {
  height: 20px;
  width: auto;
}

.weather-icon {
  font-size: 3rem;
  line-height: 1;
  vertical-align: middle;
}

/* ==========================================================================
   INDICATEURS & BARRES DE PROGRESSION
   ========================================================================== */
.bar-container {
    width: 100%;
    height: 18px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 5px 0;
}

.bar {
    height: 100%;
    width: 0%;
    transition: width 0.8s ease, background-color 0.5s;
    border-radius: 10px;
}

/* Couleurs d'état (Températures) */
.cold { background-color: #2196f3 !important; }
.cool { background-color: #4caf50 !important; }
.mild { background-color: #ffeb3b !important; }
.hot  { background-color: #ff9800 !important; }
.heat { background-color: #f44336 !important; }

.temp-cell { font-weight: bold; padding: 10px; }

/* ==========================================================================
   ALERTES (MÉTÉO & TEMPÉRATURE)
   ========================================================================== */
#alerte-container { 
    display: none; 
    padding: 20px; 
    text-align: center; 
    font-weight: bold; 
    border-radius: 8px; 
    margin: 20px; 
    animation: flash 1.5s infinite; 
}

/*==================== FLÈCHES ====================*/
.down {
  color: #1E90FF;
  font-size: 1.3rem;
}

.up {
  color: #FF8C00;
  font-size: 1.3rem;
}

/*==================== HR ====================*/
hr {
  border: none;
  height: 1px;
  background-color: #ccc;
}

.orange { background-color: #ff8c00; color: white; }
.rouge { background-color: #e74c3c; color: white; }

#alerts {
    margin-top: 15px;
    padding: 12px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 8px;
    display: none;
}

.alert-gel { display: block; background: #2196f3; color: #fff; animation: flashBlue 1s infinite; }
.alert-canicule { display: block; background: #f44336; color: #fff; animation: flashRed 1s infinite; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background: rgba(245, 245, 245, 0.95);
    text-align: center;
    padding: 15px 10px;
    color: #333;
    border-top: 1px solid #ccc;
    animation: fadeInFooter 0.6s ease-out;
}

.footer a { color: #0078d7; font-weight: 600; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-regle { font-size: 14px; margin: 5px 0; }
.footer-min_texte { font-size: 11px; color: #666; }

/*==================== ANIMATIONS ====================*/

.blink-soft {
  animation: blinkSoft 2s ease-in-out infinite;
}

/*==================== FRAME ====================*/
.frame-content {
  width: 920px;
  height: 1450px;
  margin: 10px auto;
}

.frame-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/*==================== FORM CONTACT ====================*/
.success_msg {
  color: #155724;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  padding: 10px 15px;
  border-radius: 5px;
  margin: 10px 0;
  font-weight: 500;
}

.error_msg {
  color: #721c24;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 10px 15px;
  border-radius: 5px;
  margin: 10px 0;
  font-weight: 500;
}

/* ==========================================================================
   ANIMATIONS & RESPONSIVE
   ========================================================================== */
@keyframes fadeInFooter {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


@keyframes blinkSoft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}


@keyframes flash { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes flashBlue { 0%, 100% { box-shadow: 0 0 5px #2196f3; } 50% { box-shadow: 0 0 25px #2196f3; } }
@keyframes flashRed { 0%, 100% { box-shadow: 0 0 5px #f44336; } 50% { box-shadow: 0 0 25px #f44336; } }

@media (max-width: 768px) {
    .nav-menu { gap: 6px; padding: 10px; }
    .nav-menu a { font-size: 13px; padding: 7px 10px; }
    .footer { font-size: 13px; }
    table { width: 98%; }
}

@media (max-width: 480px) {
    .weather-emoji { font-size: 2.2rem; }
    .footer a { display: block; margin-bottom: 5px; }
}